mirror of
https://github.com/coder/coder.git
synced 2025-07-23 21:32:07 +00:00
test: Fix flake with context.Cancelled in provisionerd (#386)
This occurred because the context can cancel in the same time a response is sent. This isn't a bug, because the complete still occurs.
This commit is contained in:
@ -466,15 +466,13 @@ func TestProvisionerd(t *testing.T) {
|
||||
})
|
||||
require.NoError(t, err)
|
||||
<-shutdownCtx.Done()
|
||||
err = stream.Send(&sdkproto.Provision_Response{
|
||||
return stream.Send(&sdkproto.Provision_Response{
|
||||
Type: &sdkproto.Provision_Response_Complete{
|
||||
Complete: &sdkproto.Provision_Complete{
|
||||
Error: "some error",
|
||||
},
|
||||
},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
return nil
|
||||
},
|
||||
}),
|
||||
})
|
||||
|
Reference in New Issue
Block a user