in tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/ui/DsTestFailureUi.java [191:228]
public void initStat(TestCompactedMult occurrence,
ITeamcityIgnited tcIgnited,
@Nullable Integer baseBranchId,
@Nullable Integer curBranchNormalized,
@Nullable Map<Integer, Integer> requireParameters) {
final IRunHistory stat = occurrence.history(tcIgnited, baseBranchId, requireParameters);
histBaseBranch.init(stat);
IRunHistory statForProblemsDetection;
if (!Objects.equals(curBranchNormalized, baseBranchId)) {
statForProblemsDetection = occurrence.history(tcIgnited, curBranchNormalized, requireParameters);
if (statForProblemsDetection != null) {
histCurBranch = new DsTestHistoryUi();
histCurBranch.init(statForProblemsDetection);
}
}
else
statForProblemsDetection = stat;
if (statForProblemsDetection != null) {
if (statForProblemsDetection.detectTemplate(EventTemplates.newFailure) != null)
problemRef = new DsProblemRef("New Failure");
if (statForProblemsDetection.detectTemplate(EventTemplates.newContributedTestFailure) != null)
problemRef = new DsProblemRef("Recently contributed test failure");
if (statForProblemsDetection.detectTemplate(EventTemplates.alwaysFailure) != null)
problemRef = new DsProblemRef("Always failed test");
if (statForProblemsDetection.isFlaky()
&& statForProblemsDetection.detectTemplate(EventTemplates.newFailureForFlakyTest) != null)
problemRef = new DsProblemRef("New failure of flaky test");
}
}