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:
parent
20ee648540
commit
e6b2ed4b7f
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue