in src/main/java/jetbrains/buildServer/investigationsAutoAssigner/processing/FailedTestFilter.java [42:62]
List<STestRun> apply(@NotNull final FailedBuildInfo failedBuildInfo,
@NotNull final SProject sProject,
@NotNull final List<STestRun> testRuns,
@NotNull final Map<Long, String> notApplicableTestDescription) {
SBuild sBuild = failedBuildInfo.getBuild();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(String.format("Filtering of failed tests for build id:%s started", sBuild.getBuildId()));
}
List<STestRun> filteredTestRuns = testRuns.stream()
.sorted(Comparator.comparingInt(STestRun::getOrderId))
.filter(failedBuildInfo::checkNotProcessed)
.filter(testRun -> isApplicable(sProject, sBuild, testRun, notApplicableTestDescription))
.limit(failedBuildInfo.getLimitToProcess())
.collect(Collectors.toList());
failedBuildInfo.addProcessedTestRuns(testRuns);
failedBuildInfo.increaseProcessedNumber(filteredTestRuns.size());
return filteredTestRuns;
}