Search in sources :

Example 1 with LockedApplication

use of com.yahoo.vespa.hosted.controller.LockedApplication in project vespa by vespa-engine.

the class DeploymentTriggerTest method testUpgradingButNoJobStarted.

@Test
public void testUpgradingButNoJobStarted() {
    DeploymentTester tester = new DeploymentTester();
    ReadyJobsTrigger readyJobsTrigger = new ReadyJobsTrigger(tester.controller(), Duration.ofHours(1), new JobControl(tester.controllerTester().curator()));
    LockedApplication app = (LockedApplication) tester.createAndDeploy("default0", 3, "default");
    // Store that we are upgrading but don't start the system-tests job
    tester.controller().applications().store(app.withChange(Change.of(Version.fromString("6.2"))));
    assertEquals(0, tester.deploymentQueue().jobs().size());
    readyJobsTrigger.run();
    assertEquals(1, tester.deploymentQueue().jobs().size());
    assertEquals("system-test", tester.deploymentQueue().jobs().get(0).jobName());
}
Also used : LockedApplication(com.yahoo.vespa.hosted.controller.LockedApplication) JobControl(com.yahoo.vespa.hosted.controller.maintenance.JobControl) ReadyJobsTrigger(com.yahoo.vespa.hosted.controller.maintenance.ReadyJobsTrigger) JobType.systemTest(com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobType.systemTest) Test(org.junit.Test) JobType.stagingTest(com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobType.stagingTest)

Aggregations

LockedApplication (com.yahoo.vespa.hosted.controller.LockedApplication)1 JobType.stagingTest (com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobType.stagingTest)1 JobType.systemTest (com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobType.systemTest)1 JobControl (com.yahoo.vespa.hosted.controller.maintenance.JobControl)1 ReadyJobsTrigger (com.yahoo.vespa.hosted.controller.maintenance.ReadyJobsTrigger)1 Test (org.junit.Test)1