diff --git a/e2e/e2eutil/utils.go b/e2e/e2eutil/utils.go index 9f272d9c1..413254f26 100644 --- a/e2e/e2eutil/utils.go +++ b/e2e/e2eutil/utils.go @@ -82,7 +82,7 @@ func RegisterAndWaitForAllocs(t *testing.T, nomadClient *api.Client, jobFile str func WaitForAllocRunning(t *testing.T, nomadClient *api.Client, allocID string) { testutil.WaitForResultRetries(retries, func() (bool, error) { - defer time.Sleep(time.Millisecond * 100) + time.Sleep(time.Millisecond * 100) alloc, _, err := nomadClient.Allocations().Info(allocID, nil) if err != nil { return false, err diff --git a/e2e/nomad09upgrade/exec.nomad b/e2e/nomad09upgrade/exec.nomad index ddd7e5c6e..046e3a9fa 100644 --- a/e2e/nomad09upgrade/exec.nomad +++ b/e2e/nomad09upgrade/exec.nomad @@ -6,7 +6,7 @@ job "sleep" { driver = "exec" config { - command = "/bin/sleep" + command = "sleep" args = ["10000"] } diff --git a/e2e/nomad09upgrade/rawexec.nomad b/e2e/nomad09upgrade/rawexec.nomad index 51e9c3483..75fd5aefa 100644 --- a/e2e/nomad09upgrade/rawexec.nomad +++ b/e2e/nomad09upgrade/rawexec.nomad @@ -6,7 +6,7 @@ job "sleep" { driver = "raw_exec" config { - command = "/bin/sleep" + command = "sleep" args = ["10000"] } diff --git a/e2e/nomad09upgrade/upgrade.go b/e2e/nomad09upgrade/upgrade.go index 2563c75ce..e0b18b0f3 100644 --- a/e2e/nomad09upgrade/upgrade.go +++ b/e2e/nomad09upgrade/upgrade.go @@ -318,7 +318,7 @@ func (tc *UpgradePathTC) testUpgradeForJob(t *testing.T, ver string, jobfile str // Check that the task dir mounts have been removed testutil.WaitForResult(func() (bool, error) { defer client.System().GarbageCollect() - defer time.Sleep(time.Millisecond * 100) + time.Sleep(time.Millisecond * 100) data, err := ioutil.ReadFile("/proc/mounts") if err != nil { return false, err