Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb861e04

Browse files
committed
requirereceive bad mumbo jumbo
1 parent43d1a86 commitb861e04

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

‎agent/agentcontainers/api_test.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,11 @@ func TestAPI(t *testing.T) {
13471347
}
13481348
returnerrTestTermination
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
returnerrTestTermination
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).

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp