diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2022-02-21 22:11:48 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2022-02-22 12:20:27 +0100 |
commit | a1287ff3f53bdddf475f32f7d1fe406520a46dc5 (patch) | |
tree | db7fa24e91f0086160ada71f235223328235b1dd /vespa-osgi-testrunner | |
parent | 2aa8213873330a461e9b49ae257d01eb08648495 (diff) |
Only support inconclusive test results for production tests
Diffstat (limited to 'vespa-osgi-testrunner')
-rw-r--r-- | vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/JunitRunner.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/JunitRunner.java b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/JunitRunner.java index 2ecf58ae001..58f201cd599 100644 --- a/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/JunitRunner.java +++ b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/JunitRunner.java @@ -113,7 +113,8 @@ public class JunitRunner extends AbstractComponent implements TestRunner { if (testDescriptor.isEmpty()) { throw new RuntimeException("Could not find test descriptor"); } - execution = CompletableFuture.supplyAsync(() -> launchJunit(loadClasses(testBundle.get(), testDescriptor.get(), toCategory(suite)))); + execution = CompletableFuture.supplyAsync(() -> launchJunit(loadClasses(testBundle.get(), testDescriptor.get(), toCategory(suite)), + suite == Suite.PRODUCTION_TEST)); } catch (Exception e) { execution = CompletableFuture.completedFuture(createReportWithFailedInitialization(e)); } @@ -180,7 +181,7 @@ public class JunitRunner extends AbstractComponent implements TestRunner { } } - private TestReport launchJunit(List<Class<?>> testClasses) { + private TestReport launchJunit(List<Class<?>> testClasses, boolean isProductionTest) { LauncherDiscoveryRequest discoveryRequest = LauncherDiscoveryRequestBuilder.request() .selectors( testClasses.stream().map(DiscoverySelectors::selectClass).collect(Collectors.toList()) @@ -205,7 +206,10 @@ public class JunitRunner extends AbstractComponent implements TestRunner { var failures = report.getFailures().stream() .map(failure -> new TestReport.Failure(failure.getTestIdentifier().getUniqueId(), failure.getException())) .collect(Collectors.toList()); - long inconclusive = failures.stream().filter(failure -> failure.exception() instanceof InconclusiveTestException).count(); + long inconclusive = isProductionTest ? failures.stream() + .filter(failure -> failure.exception() instanceof InconclusiveTestException) + .count() + : 0; return TestReport.builder() .withSuccessCount(report.getTestsSucceededCount()) .withAbortedCount(report.getTestsAbortedCount()) |