Skip to content

Commit 91d687c

Browse files
authored
Only print passing warning log if test passes (#807)
1 parent 6731451 commit 91d687c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/gha/integration_testing/automated_testapp/AutomatedTestRunner.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ public void LogResult() {
385385
}
386386

387387
public void CollectWarnings(List<string> warnings) {
388-
// Add a warning if multiple attempts were made.
389-
if (TookMultipleAttempts) {
388+
// Add a warning if multiple attempts were made and it passed.
389+
if (TookMultipleAttempts && Status == AutomatedTestStatus.Succeeded) {
390390
warnings.Add(String.Format("Test {0} took {1} of {2} attempts to pass (Possible Flake).",
391391
Description, currentAttempt, maxAttempts));
392392
}

0 commit comments

Comments
 (0)