Skip to content

Commit

Permalink
Modified the test to wait for 3 seconds before inspecting containers
Browse files Browse the repository at this point in the history
  • Loading branch information
diptanu committed Apr 14, 2016
1 parent 5bc6d3f commit 3c973fd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions client/driver/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -791,13 +791,17 @@ func TestDockerDriver_CleanupContainer(t *testing.T) {
if !res.Successful() {
t.Fatalf("err: %v", res)
}

time.Sleep(3 * time.Second)

// Ensure that the container isn't present
_, err := client.InspectContainer(handle.(*DockerHandle).containerID)
if err == nil {
t.Fatalf("expected to not get container")
}

case <-time.After(time.Duration(tu.TestMultiplier()*5) * time.Second):
t.Fatalf("timeout")
}

// Ensure that the container isn't present
if _, err := client.InspectContainer(handle.(*DockerHandle).containerID); err == nil {
t.Fatalf("expected to not get container")
}

}

0 comments on commit 3c973fd

Please sign in to comment.