Some test fixes to e2e rescheduling tests
This commit is contained in:
parent
e90d051c43
commit
02567ade71
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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))
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue