in src/main/java/jetbrains/buildServer/investigationsAutoAssigner/processing/FailedTestFilter.java [83:116]
private boolean isApplicable(@NotNull final SProject project,
@NotNull final SBuild sBuild,
@NotNull final STestRun testRun,
@NotNull final Map<Long, String> notApplicableTestDescription) {
String reason = null;
final STest test = testRun.getTest();
if (testRun.isMuted()) {
reason = "was muted";
} else if (testRun.isFixed()) {
reason = "was fixed";
} else if (!testRun.isNewFailure()) {
reason = "occurred not for the first time";
} else if (myInvestigationsManager.checkUnderInvestigation(project, sBuild, test)) {
reason = "was already under an investigation";
} else if (myFlakyTestDetector.isFlaky(test.getTestNameId())) {
reason = "was marked as flaky";
} else if (myIgnoreSetupMethods && isSetUpOrTearDown(testRun.getTest().getName())) {
reason = "is not a test but rather setUp or tearDown";
}
boolean isApplicable = reason == null;
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(String.format("%s Test problem is %s.%s",
Utils.getLogPrefix(testRun),
(isApplicable ? "applicable" : "not applicable"),
(isApplicable ? "" : String.format(" Reason: this test %s.", reason))
));
}
if (!isApplicable && testRun.isNewFailure()) {
notApplicableTestDescription.put(testRun.getTest().getTestNameId(), reason);
}
return isApplicable;
}