Skip to content
Permalink
Browse files
Improved flaky test detection to avoid reporting redundant messages #173


Signed-off-by: Ivan Rakov <ivan.glukos@gmail.com>
  • Loading branch information
sergeyuttsel authored and glukos committed Aug 11, 2020
1 parent b0b3580 commit a3c72c70b756a6abc014f70962d7ad5a8b61b827
Showing 1 changed file with 6 additions and 1 deletion.
@@ -517,7 +517,12 @@ private boolean registerTestFailIssues(ITeamcityIgnited tcIgnited,

if (flakyRate > cfg.flakyRate()) {
type = IssueType.newTestWithHighFlakyRate;
firstFailedBuildId = lastInvocations.get(confidenceOkTestsRow).buildId();

firstFailedBuildId = lastInvocations.stream()
.filter(invocation -> invocation.status() == RES_FAILURE.getCode())
.findFirst()
.orElseGet(() -> lastInvocations.get(confidenceOkTestsRow))
.buildId();
}
}
}

0 comments on commit a3c72c7

Please sign in to comment.