Use channel to propagate the stop info of sandbox

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
This commit is contained in:
Yanqiang Miao
2018-01-26 10:50:54 +08:00
parent f401662123
commit 61c1fdb098
9 changed files with 56 additions and 43 deletions

View File

@@ -68,10 +68,6 @@ func TestWaitContainerStop(t *testing.T) {
)
assert.NoError(t, err)
assert.NoError(t, c.containerStore.Add(container))
if test.status.FinishedAt != 0 {
// Fake the TaskExit event
container.Stop()
}
ctx := context.Background()
if test.cancel {
cancelledCtx, cancel := context.WithCancel(ctx)