File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -578,10 +578,11 @@ func TestPatchCancelWorkspaceBuild(t *testing.T) {
578
578
return assert .NoError (t , err ) && build .Job .Status == codersdk .ProvisionerJobRunning
579
579
}, testutil .WaitShort , testutil .IntervalFast )
580
580
581
- time .Sleep (testutil .IntervalMedium )
581
+ require .Eventually (t , func () bool {
582
+ err := client .CancelWorkspaceBuild (ctx , build .ID , codersdk.CancelWorkspaceBuildParams {})
583
+ return assert .NoError (t , err )
584
+ }, testutil .WaitShort , testutil .IntervalMedium )
582
585
583
- err := client .CancelWorkspaceBuild (ctx , build .ID , codersdk.CancelWorkspaceBuildParams {})
584
- require .NoError (t , err )
585
586
require .Eventually (t , func () bool {
586
587
var err error
587
588
build , err = client .WorkspaceBuild (ctx , build .ID )
You can’t perform that action at this time.
0 commit comments