@@ -264,7 +264,7 @@ func Test_Runner(t *testing.T) {
264
264
// Wait for the workspace build job to be picked up.
265
265
checkJobStartedCtx := testutil .Context (t ,testutil .WaitLong )
266
266
jobCh := make (chan codersdk.ProvisionerJob ,1 )
267
- require .Eventually (t ,func ()bool {
267
+ testutil .Eventually (checkJobStartedCtx , t ,func (ctx context. Context )bool {
268
268
workspaces ,err := client .Workspaces (checkJobStartedCtx , codersdk.WorkspaceFilter {})
269
269
if err != nil {
270
270
return false
@@ -286,7 +286,7 @@ func Test_Runner(t *testing.T) {
286
286
}
287
287
jobCh <- ws .LatestBuild .Job
288
288
return true
289
- },testutil .WaitLong , testutil . IntervalSlow )
289
+ },testutil .IntervalSlow )
290
290
291
291
t .Log ("canceling scaletest workspace creation" )
292
292
runnerCancel ()
@@ -308,9 +308,8 @@ func Test_Runner(t *testing.T) {
308
308
}()
309
309
310
310
// Ensure the job has been marked as canceled
311
- checkJobCanceledCtx := testutil .Context (t ,testutil .WaitLong )
312
- require .Eventually (t ,func ()bool {
313
- pj ,err := client .OrganizationProvisionerJob (checkJobCanceledCtx ,runningJob .OrganizationID ,runningJob .ID )
311
+ testutil .Eventually (cleanupCtx ,t ,func (ctx context.Context )bool {
312
+ pj ,err := client .OrganizationProvisionerJob (ctx ,runningJob .OrganizationID ,runningJob .ID )
314
313
if ! assert .NoError (t ,err ) {
315
314
return false
316
315
}
@@ -324,7 +323,7 @@ func Test_Runner(t *testing.T) {
324
323
}
325
324
326
325
return true
327
- },testutil .WaitLong , testutil . IntervalSlow )
326
+ },testutil .IntervalSlow )
328
327
cleanupCancel ()
329
328
<- done
330
329
cleanupLogsStr := cleanupLogs .String ()