in tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/ui/DsChainUi.java [295:337]
public void findNewTests(FullChainRunCtx ctx,
ITeamcityIgnited tcIgnited,
String baseBranchTc,
IStringCompactor compactor,
NewTestsStorage newTestsStorage){
String failRateNormalizedBranch = normalizeBranch(baseBranchTc);
Integer baseBranchId = compactor.getStringIdIfPresent(failRateNormalizedBranch);
newTestsUi = ctx
.suites()
.map((suite) -> {
List<ShortTestUi> missingTests = suite.getFilteredTests(test -> {
IRunHistory history = test.history(tcIgnited, baseBranchId, null);
if (history == null && !test.isMutedOrIgored()) {
if (test.getId() != null &&
newTestsStorage.isNewTest(tcIgnited.serverCode(),
test.getId(), failRateNormalizedBranch, ctx.branchName()))
return true;
else
return false;
}
else
return false;
})
.stream()
.map(occurrence -> {
ShortTestUi tst = new ShortTestUi().initFrom(occurrence, occurrence.isPassed());
return tst;
})
.filter(Objects::nonNull)
.collect(Collectors.toList());
if (!missingTests.isEmpty()) {
return new ShortSuiteNewTestsUi()
.tests(missingTests)
.initFrom(suite, tcIgnited);
}
return null;
})
.filter(Objects::nonNull)
.collect(Collectors.toList());
}