summaryrefslogtreecommitdiffstats
path: root/vespa-osgi-testrunner
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2022-02-28 10:29:25 +0100
committerJon Marius Venstad <venstad@gmail.com>2022-02-28 10:29:25 +0100
commita89c8f289cc1868923e15ff1dc01cacbfc4e1ef5 (patch)
treeaadad7cd3f6d0c4727746a9fd5e7af6710457cbe /vespa-osgi-testrunner
parenta958c6a1e6a24ae93ee92cfcf3f8c44cb32ebcf1 (diff)
Use a "null" report to indicate no tests bundle (i.e. not test report)
Diffstat (limited to 'vespa-osgi-testrunner')
-rw-r--r--vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/JunitRunner.java4
1 files changed, 2 insertions, 2 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 12d50ca725c..a7c40ddfad2 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
@@ -105,7 +105,7 @@ public class JunitRunner extends AbstractComponent implements TestRunner {
logRecords.clear();
Optional<Bundle> testBundle = findTestBundle();
if (testBundle.isEmpty()) {
- execution = CompletableFuture.completedFuture(TestReport.builder().build());
+ execution = CompletableFuture.completedFuture(null);
return execution;
}
@@ -231,7 +231,7 @@ public class JunitRunner extends AbstractComponent implements TestRunner {
if (execution == null) return TestRunner.Status.NOT_STARTED;
if ( ! execution.isDone()) return TestRunner.Status.RUNNING;
try {
- return execution.get().status();
+ return execution.get() == null ? Status.NO_TESTS : execution.get().status();
} catch (InterruptedException|ExecutionException e) {
logger.log(Level.WARNING, "Error while getting test report", e);
return TestRunner.Status.ERROR;