From 8342f853d5c8c2e2560c8a2da28919e439641f3b Mon Sep 17 00:00:00 2001 From: jonmv Date: Fri, 28 Apr 2023 16:02:41 +0200 Subject: Update unit test with human cancellation --- .../hosted/controller/deployment/DeploymentTriggerTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'controller-server/src/test') 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()); -- cgit v1.2.3