diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-08-27 12:22:17 +0200 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-08-27 12:22:17 +0200 |
commit | 91d3fe58055ed63b3df1ed80617cc37b0acad3cb (patch) | |
tree | 2872206360a13e1f73267708a216d3daf151372b /controller-server | |
parent | 7eb918c6649534ef93ef54c1a4bd62873955f73a (diff) |
Throw IllegalStateException when unknown state, and log it
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java index d3447fb8774..0c2d8c9dfba 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java @@ -334,7 +334,8 @@ public class InternalStepRunner implements StepRunner { controller.jobController().updateTestLog(id); RunStatus status; - switch (controller.jobController().cloud().getStatus(testerEndpoint)) { + TesterCloud.Status testStatus = controller.jobController().cloud().getStatus(testerEndpoint); + switch (testStatus) { case NOT_STARTED: throw new IllegalStateException("Tester reports tests not started, even though they should have!"); case RUNNING: @@ -349,7 +350,7 @@ public class InternalStepRunner implements StepRunner { logger.log("Tests completed successfully."); status = running; break; default: - throw new IllegalArgumentException("Unknown status!"); + throw new IllegalStateException("Unknown status '" + testStatus + "'!"); } return Optional.of(status); } |