Skip to content

Commit

Permalink
[rel/3.6] Fix timedout test does not fail test run (in ui) (#3774)
Browse files Browse the repository at this point in the history
  • Loading branch information
nohwnd authored Sep 6, 2024
1 parent ff20766 commit 60dc7a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,8 @@ internal void TestCompleted(
switch (outcome)
{
case TestOutcome.Error:
asm.FailedTests++;
asm.TotalTests++;
break;
case TestOutcome.Timeout:
case TestOutcome.Canceled:
case TestOutcome.Fail:
asm.FailedTests++;
asm.TotalTests++;
Expand All @@ -397,14 +396,6 @@ internal void TestCompleted(
asm.SkippedTests++;
asm.TotalTests++;
break;
case TestOutcome.Timeout:
asm.TimedOutTests++;
asm.TotalTests++;
break;
case TestOutcome.Canceled:
asm.CanceledTests++;
asm.TotalTests++;
break;
}

_terminalWithProgress.UpdateWorker(asm.SlotIndex);
Expand Down Expand Up @@ -645,7 +636,7 @@ internal void AssemblyRunCompleted(string assembly, string? targetFramework, str

private static void AppendAssemblySummary(TestProgressState assemblyRun, ITerminal terminal)
{
int failedTests = assemblyRun.FailedTests + assemblyRun.CanceledTests + assemblyRun.TimedOutTests;
int failedTests = assemblyRun.FailedTests;
int warnings = 0;

AppendAssemblyLinkTargetFrameworkAndArchitecture(terminal, assemblyRun.Assembly, assemblyRun.TargetFramework, assemblyRun.Architecture);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ public TestProgressState(string assembly, string? targetFramework, string? archi

public int TotalTests { get; internal set; }

public int TimedOutTests { get; internal set; }

public int CanceledTests { get; internal set; }

public string? Detail { get; internal set; }

public int SlotIndex { get; internal set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public void OutputFormattingIsCorrect()
errorMessage: null, errorStackTrace: null, expected: null, actual: null);
terminalReporter.TestCompleted(assembly, targetFramework, architecture, "SkippedTest1", TestOutcome.Skipped, TimeSpan.FromSeconds(10),
errorMessage: null, errorStackTrace: null, expected: null, actual: null);
// timed out + cancelled + failed should all report as failed in summary
terminalReporter.TestCompleted(assembly, targetFramework, architecture, "TimedoutTest1", TestOutcome.Timeout, TimeSpan.FromSeconds(10),
errorMessage: null, errorStackTrace: null, expected: null, actual: null);
terminalReporter.TestCompleted(assembly, targetFramework, architecture, "CanceledTest1", TestOutcome.Canceled, TimeSpan.FromSeconds(10),
Expand Down Expand Up @@ -107,7 +108,7 @@ public void OutputFormattingIsCorrect()
- ␛[90;1m␛]8;;file:///{folderLink}artifact2.txt␛\{folder}artifact2.txt␛]8;;␛\␛[m
␛[91;1mTest run summary: Failed!␛[90;1m - ␛[m␛[90;1m␛]8;;file:///{folderLinkNoSlash}␛\{folder}assembly.dll␛]8;;␛\␛[m (net8.0|x64)
␛[m total: 5
␛[91;1m failed: 1
␛[91;1m failed: 3
␛[m succeeded: 1
skipped: 1
duration: 3652058d 23h 59m 59s 999ms
Expand Down

0 comments on commit 60dc7a5

Please sign in to comment.