File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -1347,7 +1347,11 @@ func TestAPI(t *testing.T) {
1347
1347
}
1348
1348
return errTestTermination
1349
1349
})
1350
- testutil .RequireReceive (ctx , t , terminated )
1350
+ select {
1351
+ case <- ctx .Done ():
1352
+ t .Fatal ("timeout waiting for agent termination" )
1353
+ case <- terminated :
1354
+ }
1351
1355
1352
1356
t .Log ("Waiting for agent reinjection..." )
1353
1357
@@ -1371,7 +1375,11 @@ func TestAPI(t *testing.T) {
1371
1375
assert .Fail (t , `want "agent" command argument` )
1372
1376
}
1373
1377
close (agentStarted )
1374
- <- continueTerminate
1378
+ select {
1379
+ case <- ctx .Done ():
1380
+ t .Error ("timeout waiting for agent continueTerminate" )
1381
+ case <- continueTerminate :
1382
+ }
1375
1383
return errTestTermination
1376
1384
})
1377
1385
@@ -1429,7 +1437,11 @@ func TestAPI(t *testing.T) {
1429
1437
1430
1438
// Terminate the running agent.
1431
1439
close (continueTerminate )
1432
- testutil .RequireReceive (ctx , t , terminated )
1440
+ select {
1441
+ case <- ctx .Done ():
1442
+ t .Fatal ("timeout waiting for agent termination" )
1443
+ case <- terminated :
1444
+ }
1433
1445
1434
1446
// Simulate the agent deletion (this happens because the
1435
1447
// devcontainer configuration changed).
You can’t perform that action at this time.
0 commit comments