Skip to content
Permalink
Browse files
Changed rule for detecting critical suite failure. Fixes #174
Signed-off-by: Slava Koptilin <slava.koptilin@gmail.com>
  • Loading branch information
sergeyuttsel authored and sk0x50 committed Sep 14, 2020
1 parent a3c72c7 commit 170c4c3ea113fc02ff5113408e3f240f5b721d0e
Showing 4 changed files with 15 additions and 14 deletions.
@@ -42,6 +42,9 @@ interface ISuiteResults {
/** */
public boolean hasBuildMessageProblem();

/** */
public boolean hasProblemNonByFailedTest();


public String suiteId();
}
@@ -208,6 +208,10 @@ public boolean hasOomeProblem() {
return getExitCodeProblemsCount() > 0;
}

public boolean hasProblemNonByFailedTest() {
return buildsStream().anyMatch(SingleBuildRunCtx::hasProblemNonByFailedTest);
}

private long getExitCodeProblemsCount() {
return buildsStream().filter(SingleBuildRunCtx::hasExitCodeProblem).count();
}
@@ -594,12 +598,7 @@ public StringBuilder appendCriticalFailRate(IRunHistory baseBranchHist, StringBu
}

public boolean hasCriticalProblem() {
return hasJvmCrashProblem()
|| hasTimeoutProblem()
|| hasCompilationProblem()
|| hasMetricProblem()
|| hasExitCodeProblem()
|| hasOomeProblem();
return hasProblemNonByFailedTest();
}

public int totalTests() {
@@ -118,6 +118,10 @@ Stream<ProblemCompacted> getProblemsStream() {
return getProblemsStream().anyMatch(p -> p.isExitCode(compactor));
}

@Override public boolean hasProblemNonByFailedTest() {
return getProblemsStream().anyMatch(p -> !p.isFailedTests(compactor));
}

@Override public String suiteId() {
return compactor.getStringFromId(buildCompacted.buildTypeId());
}
@@ -325,12 +329,7 @@ public boolean hasBuildProblemType(int id) {
}

public boolean hasSuiteIncompleteFailure() {
return hasJvmCrashProblem()
|| hasTimeoutProblem()
|| hasOomeProblem()
|| hasExitCodeProblem()
|| hasCompilationProblem()
|| hasMetricProblem();
return hasProblemNonByFailedTest();
}

public int totalNotMutedTests() {
@@ -39,8 +39,8 @@ public class EventTemplates {
);

public static final EventTemplate newCriticalFailure = new EventTemplate(
new int[]{OK_OR_FAILURE, OK_OR_FAILURE, OK_OR_FAILURE, OK_OR_FAILURE, OK_OR_FAILURE},
new int[]{CRITICAL_FAILURE, CRITICAL_FAILURE, CRITICAL_FAILURE, CRITICAL_FAILURE}
new int[]{OK_OR_FAILURE},
new int[]{CRITICAL_FAILURE, CRITICAL_FAILURE, CRITICAL_FAILURE}
);

public static final EventTemplate newContributedTestFailure = new EventTemplate(

0 comments on commit 170c4c3

Please sign in to comment.