1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fixes race condition in test. Closes #9389.

Signed-off-by: Emily Maier <emily@emilymaier.net>
This commit is contained in:
Emily Maier 2014-11-28 13:48:50 -05:00
parent 4083fa2620
commit 9c5e61c24c

View file

@ -13,7 +13,7 @@ func TestStartAttachReturnsOnError(t *testing.T) {
defer deleteAllContainers() defer deleteAllContainers()
dockerCmd(t, "run", "-d", "--name", "test", "busybox") dockerCmd(t, "run", "-d", "--name", "test", "busybox")
dockerCmd(t, "stop", "test") dockerCmd(t, "wait", "test")
// Expect this to fail because the above container is stopped, this is what we want // Expect this to fail because the above container is stopped, this is what we want
if _, err := runCommand(exec.Command(dockerBinary, "run", "-d", "--name", "test2", "--link", "test:test", "busybox")); err == nil { if _, err := runCommand(exec.Command(dockerBinary, "run", "-d", "--name", "test2", "--link", "test:test", "busybox")); err == nil {