From e6b2ed4b7f1511c9842b064e03d423f08584fa45 Mon Sep 17 00:00:00 2001 From: Kenfe-Mickael Laventure Date: Mon, 28 Mar 2016 11:25:50 -0700 Subject: [PATCH] Wait maximum 3s per container kill when tearing down a test Signed-off-by: Kenfe-Mickael Laventure --- integration-test/check_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/integration-test/check_test.go b/integration-test/check_test.go index 23508e7..a3214aa 100644 --- a/integration-test/check_test.go +++ b/integration-test/check_test.go @@ -223,6 +223,10 @@ func (cs *ContainerdSuite) TearDownTest(c *check.C) { fmt.Fprintf(os.Stderr, "Failed to cleanup leftover test containers: %v", err) } - <-ch + select { + case <-ch: + case <-time.After(3 * time.Second): + fmt.Fprintf(os.Stderr, "TearDownTest: Containerd %v didn't die after 3 seconds", ctr.Id) + } } }