RunPodSandbox should block unless client context is canceled
A call to RunPodSandbox should only return timeout if the operation has timed out because the clients context deadline was exceeded. On client cancelation it should return gRPC Canceled otherwise it should block until the sandbox has exited. Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
This commit is contained in:
@@ -62,7 +62,12 @@ func TestWaitSandboxStop(t *testing.T) {
|
||||
cancel()
|
||||
ctx = cancelledCtx
|
||||
}
|
||||
err := c.waitSandboxStop(ctx, sandbox, test.timeout)
|
||||
if test.timeout > 0 {
|
||||
timeoutCtx, cancel := context.WithTimeout(ctx, test.timeout)
|
||||
defer cancel()
|
||||
ctx = timeoutCtx
|
||||
}
|
||||
err := c.waitSandboxStop(ctx, sandbox)
|
||||
assert.Equal(t, test.expectErr, err != nil, desc)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user