Wait maximum 3s per container kill when tearing down a test

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-03-28 11:25:50 -07:00
parent 20ee648540
commit e6b2ed4b7f

View file

@ -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)
}
}
}