Handle case where shim is reaped before the call to the runtime start
This avoid erroring out with a false positive Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
2e4e484237
commit
d8b9559d8e
4 changed files with 29 additions and 18 deletions
|
@ -258,13 +258,13 @@ func (cs *ContainerdSuite) TearDownTest(c *check.C) {
|
|||
})
|
||||
|
||||
if err := cs.KillContainer(ctr.Id); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to cleanup leftover test containers: %v", err)
|
||||
fmt.Fprintf(os.Stderr, "Failed to cleanup leftover test containers: %v\n", err)
|
||||
}
|
||||
|
||||
select {
|
||||
case <-ch:
|
||||
case <-time.After(3 * time.Second):
|
||||
fmt.Fprintf(os.Stderr, "TearDownTest: Containerd %v didn't die after 3 seconds", ctr.Id)
|
||||
fmt.Fprintf(os.Stderr, "TearDownTest: Containerd %v didn't die after 3 seconds\n", ctr.Id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue