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

Commitebad5c3

Browse files
authored
test(agent): fix channel timeout in TestNewServer_CloseActiveConnections (#17690)
This fixes a test issue where we were waiting on a channel indefinitelyand the test timed out instead of failing due to earlier error.Updatescoder/internal#558
1 parentec003b7 commitebad5c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎agent/agentssh/agentssh_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ func TestNewServer_CloseActiveConnections(t *testing.T) {
214214
}
215215

216216
for_,ch:=rangewaitConns {
217-
<-ch
217+
select {
218+
case<-ctx.Done():
219+
t.Fatal("timeout")
220+
case<-ch:
221+
}
218222
}
219223

220224
returns,wg.Wait

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp