summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2023-04-28 16:02:41 +0200
committerjonmv <venstad@gmail.com>2023-04-28 16:02:41 +0200
commit8342f853d5c8c2e2560c8a2da28919e439641f3b (patch)
tree163a2fad9556cd6db4c5c88541415f3dc1738783 /controller-server
parent0129d74396292f894a636061bf58dc53a2ed1a2c (diff)
Update unit test with human cancellation
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java
index 6e5c2458c92..e5a10bb5889 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java
@@ -119,6 +119,15 @@ public class DeploymentTriggerTest {
tester.triggerJobs();
app.assertRunning(productionUsWest1);
+ tester.jobs().abort(tester.jobs().last(app.instanceId(), productionUsWest1).get().id(), "cancelled", true);
+ tester.runner().run();
+ assertEquals(RunStatus.cancelled, tester.jobs().last(app.instanceId(), productionUsWest1).get().status());
+ tester.triggerJobs();
+ app.assertNotRunning(productionUsWest1);
+ tester.deploymentTrigger().reTrigger(app.instanceId(), productionUsWest1, "retry");
+ app.assertRunning(productionUsWest1);
+
+ // invalid application is not retried
tester.configServer().throwOnNextPrepare(new ConfigServerException(ErrorCode.INVALID_APPLICATION_PACKAGE, "nope", "bah"));
tester.runner().run();
assertEquals(RunStatus.invalidApplication, tester.jobs().last(app.instanceId(), productionUsWest1).get().status());