mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix a race condition in the integration tests
This commit is contained in:
parent
02cb7f45fa
commit
2302293244
1 changed files with 1 additions and 2 deletions
|
@ -71,9 +71,8 @@ func TestInterruptedRegister(t *testing.T) {
|
||||||
Comment: "testing",
|
Comment: "testing",
|
||||||
Created: time.Now(),
|
Created: time.Now(),
|
||||||
}
|
}
|
||||||
go graph.Register(nil, badArchive, image)
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
|
||||||
w.CloseWithError(errors.New("But I'm not a tarball!")) // (Nobody's perfect, darling)
|
w.CloseWithError(errors.New("But I'm not a tarball!")) // (Nobody's perfect, darling)
|
||||||
|
graph.Register(nil, badArchive, image)
|
||||||
if _, err := graph.Get(image.ID); err == nil {
|
if _, err := graph.Get(image.ID); err == nil {
|
||||||
t.Fatal("Image should not exist after Register is interrupted")
|
t.Fatal("Image should not exist after Register is interrupted")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue