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

Fix race in TestDaemonRestartWithVolumesRefs

Sometimes rm begins before process death, but Kill called already after
it, so we get error - no such process.

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
This commit is contained in:
Alexandr Morozov 2014-12-10 20:55:51 -08:00
parent b905f88ee5
commit 0d70ad1c72

View file

@ -66,7 +66,7 @@ func TestDaemonRestartWithVolumesRefs(t *testing.T) {
if err := d.Restart(); err != nil { if err := d.Restart(); err != nil {
t.Fatal(err) t.Fatal(err)
} }
if _, err := d.Cmd("run", "-d", "--volumes-from", "volrestarttest1", "--name", "volrestarttest2", "busybox"); err != nil { if _, err := d.Cmd("run", "-d", "--volumes-from", "volrestarttest1", "--name", "volrestarttest2", "busybox", "top"); err != nil {
t.Fatal(err) t.Fatal(err)
} }
if out, err := d.Cmd("rm", "-fv", "volrestarttest2"); err != nil { if out, err := d.Cmd("rm", "-fv", "volrestarttest2"); err != nil {