From 330062ef723f66ed8a640627f983e586f46df03a Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Thu, 17 Oct 2013 23:59:59 +0000 Subject: [PATCH] Remove race condition caused by double-destroy in 2 tests --- container_test.go | 1 - runtime_test.go | 6 ------ 2 files changed, 7 deletions(-) diff --git a/container_test.go b/container_test.go index 9fdddc9044..414ce64b98 100644 --- a/container_test.go +++ b/container_test.go @@ -1072,7 +1072,6 @@ func TestLXCConfig(t *testing.T) { if err != nil { t.Fatal(err) } - defer runtime.Destroy(container) container.generateLXCConfig(nil) grepFile(t, container.lxcConfigPath(), "lxc.utsname = foobar") grepFile(t, container.lxcConfigPath(), diff --git a/runtime_test.go b/runtime_test.go index 8347f92f20..a0ed14f706 100644 --- a/runtime_test.go +++ b/runtime_test.go @@ -276,12 +276,6 @@ func TestRuntimeCreate(t *testing.T) { t.Fatal(err) } - defer func() { - if err := runtime.Destroy(container); err != nil { - t.Error(err) - } - }() - // Make sure we can find the newly created container with List() if len(runtime.List()) != 1 { t.Errorf("Expected 1 container, %v found", len(runtime.List()))