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) {
13471347 }
13481348 return errTestTermination
13491349 })
1350- testutil .RequireReceive (ctx , t , terminated )
1350+ select {
1351+ case <- ctx .Done ():
1352+ t .Fatal ("timeout waiting for agent termination" )
1353+ case <- terminated :
1354+ }
13511355
13521356 t .Log ("Waiting for agent reinjection..." )
13531357
@@ -1371,7 +1375,11 @@ func TestAPI(t *testing.T) {
13711375 assert .Fail (t , `want "agent" command argument` )
13721376 }
13731377 close (agentStarted )
1374- <- continueTerminate
1378+ select {
1379+ case <- ctx .Done ():
1380+ t .Error ("timeout waiting for agent continueTerminate" )
1381+ case <- continueTerminate :
1382+ }
13751383 return errTestTermination
13761384 })
13771385
@@ -1429,7 +1437,11 @@ func TestAPI(t *testing.T) {
14291437
14301438 // Terminate the running agent.
14311439 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+ }
14331445
14341446 // Simulate the agent deletion (this happens because the
14351447 // devcontainer configuration changed).
You can’t perform that action at this time.
0 commit comments