From 8a3d9c6cf39bcc8bf8a7e41859fe6bf71b5952bc Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Tue, 26 Nov 2013 04:54:34 +0000 Subject: [PATCH] Fix a race condition in the integration tests Upstream-commit: 23022932440006aca0a954763bf8e3a5882f94d3 Component: engine --- components/engine/integration/graph_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/engine/integration/graph_test.go b/components/engine/integration/graph_test.go index 2e5c6a0e07..118ec17863 100644 --- a/components/engine/integration/graph_test.go +++ b/components/engine/integration/graph_test.go @@ -71,9 +71,8 @@ func TestInterruptedRegister(t *testing.T) { Comment: "testing", 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) + graph.Register(nil, badArchive, image) if _, err := graph.Get(image.ID); err == nil { t.Fatal("Image should not exist after Register is interrupted") }