diff options
author | Valerij Fredriksen <freva@users.noreply.github.com> | 2022-02-23 13:15:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 13:15:53 +0100 |
commit | b2da3c9302a3d18975805dcb018fe20feb01ea78 (patch) | |
tree | 382737ec1e20babdf5bd65402be4b32c82016723 /controller-server/src/test/java/com/yahoo | |
parent | 13e5f28849839fc674dbd4b37683e5d7bbff5c57 (diff) | |
parent | 5d5788be39bae9c34a703c418201aa913d87f8db (diff) |
Merge pull request #21336 from vespa-engine/jonmv/long-deployment-pipelines-2
Jonmv/long deployment pipelines 2
Diffstat (limited to 'controller-server/src/test/java/com/yahoo')
-rw-r--r-- | controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java | 33 |
1 files changed, 33 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 6cd4e3e92c3..d1b76dd96be 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 @@ -2,6 +2,7 @@ package com.yahoo.vespa.hosted.controller.deployment; import com.yahoo.component.Version; +import com.yahoo.config.provision.InstanceName; import com.yahoo.config.provision.SystemName; import com.yahoo.config.provision.zone.RoutingMethod; import com.yahoo.config.provision.zone.ZoneId; @@ -243,6 +244,38 @@ public class DeploymentTriggerTest { } @Test + public void testOutstandingChangeWithNextRevisionTarget() { + ApplicationPackage appPackage = new ApplicationPackageBuilder().revisionTarget("next") + .revisionChange("when-failing") + .region("us-east-3") + .build(); + DeploymentContext app = tester.newDeploymentContext() + .submit(appPackage); + Optional<ApplicationVersion> revision0 = app.lastSubmission(); + + app.submit(appPackage); + Optional<ApplicationVersion> revision1 = app.lastSubmission(); + + app.submit(appPackage); + Optional<ApplicationVersion> revision2 = app.lastSubmission(); + + app.submit(appPackage); + Optional<ApplicationVersion> revision3 = app.lastSubmission(); + + assertEquals(revision0, app.instance().change().application()); + assertEquals(revision1, app.deploymentStatus().outstandingChange(InstanceName.defaultName()).application()); + + tester.deploymentTrigger().forceChange(app.instanceId(), Change.of(revision1.get())); + assertEquals(revision1, app.instance().change().application()); + assertEquals(revision2, app.deploymentStatus().outstandingChange(InstanceName.defaultName()).application()); + + app.deploy(); + tester.outstandingChangeDeployer().run(); + assertEquals(revision2, app.instance().change().application()); + assertEquals(revision3, app.deploymentStatus().outstandingChange(InstanceName.defaultName()).application()); + } + + @Test public void deploymentSpecWithDelays() { ApplicationPackage applicationPackage = new ApplicationPackageBuilder() .systemTest() |