diff --git a/e2e/rescheduling/input/rescheduling_canary_autorevert.hcl b/e2e/rescheduling/input/rescheduling_canary_autorevert.hcl index cef2e5a37..b1194cbf9 100644 --- a/e2e/rescheduling/input/rescheduling_canary_autorevert.hcl +++ b/e2e/rescheduling/input/rescheduling_canary_autorevert.hcl @@ -18,8 +18,9 @@ job "test" { canary = 3 max_parallel = 1 min_healthy_time = "1s" - healthy_deadline = "1m" auto_revert = true + healthy_deadline = "2s" + progress_deadline = "3s" } restart { diff --git a/e2e/rescheduling/input/rescheduling_update.hcl b/e2e/rescheduling/input/rescheduling_update.hcl index d4ecd6481..6906f9f0b 100644 --- a/e2e/rescheduling/input/rescheduling_update.hcl +++ b/e2e/rescheduling/input/rescheduling_update.hcl @@ -16,8 +16,10 @@ job "test4" { update { max_parallel = 1 - min_healthy_time = "10s" + min_healthy_time = "3s" auto_revert = false + healthy_deadline = "5s" + progress_deadline = "10s" } restart { diff --git a/e2e/rescheduling/server_side_restarts_test.go b/e2e/rescheduling/server_side_restarts_test.go index 9f0f402df..91de7ba35 100644 --- a/e2e/rescheduling/server_side_restarts_test.go +++ b/e2e/rescheduling/server_side_restarts_test.go @@ -168,11 +168,11 @@ var _ = Describe("Server Side Restart Tests", func() { ConsistOf([]string{"running", "running", "running"})) }) Context("Updating job to make allocs fail", func() { - It("Should have no rescheduled allocs", func() { + It("Should have rescheduled allocs until progress deadline", func() { job.TaskGroups[0].Tasks[0].Config["args"] = []string{"-c", "lol"} _, _, err := jobs.Register(job, nil) Expect(err).ShouldNot(HaveOccurred()) - Eventually(allocStatusesRescheduled, 2*time.Second, time.Second).Should(BeEmpty()) + Eventually(allocStatusesRescheduled, 5*time.Second, time.Second).ShouldNot(BeEmpty()) }) }) @@ -192,16 +192,17 @@ var _ = Describe("Server Side Restart Tests", func() { }) Context("Updating job to make allocs fail", func() { - It("Should have no rescheduled allocs", func() { + It("Should have rescheduled allocs until progress deadline", func() { job.TaskGroups[0].Tasks[0].Config["args"] = []string{"-c", "lol"} _, _, err := jobs.Register(job, nil) Expect(err).ShouldNot(HaveOccurred()) - Eventually(allocStatusesRescheduled, 2*time.Second, time.Second).Should(BeEmpty()) + Eventually(allocStatusesRescheduled, 5*time.Second, time.Second).ShouldNot(BeEmpty()) // Verify new deployment and its status + // Deployment status should be running (because of progress deadline) time.Sleep(3 * time.Second) //TODO(preetha) figure out why this wasn't working with ginkgo constructs Eventually(deploymentStatus(), 2*time.Second, time.Second).Should( - ContainElement(structs.DeploymentStatusFailed)) + ContainElement(structs.DeploymentStatusRunning)) }) })