Skip to content

Commit

Permalink
test: Fix flake with context.Cancelled in provisionerd (#386)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kylecarbs committed Mar 1, 2022
1 parent fd5eceb commit ea5efbd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions provisionerd/provisionerd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
}),
})
Expand Down

0 comments on commit ea5efbd

Please sign in to comment.