mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
test(agent): fix channel timeout in TestNewServer_CloseActiveConnections (#17690)
This fixes a test issue where we were waiting on a channel indefinitely and the test timed out instead of failing due to earlier error. Updates coder/internal#558
This commit is contained in:
committed by
GitHub
parent
ec003b7cf9
commit
ebad5c3ed0
@ -214,7 +214,11 @@ func TestNewServer_CloseActiveConnections(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, ch := range waitConns {
|
for _, ch := range waitConns {
|
||||||
<-ch
|
select {
|
||||||
|
case <-ctx.Done():
|
||||||
|
t.Fatal("timeout")
|
||||||
|
case <-ch:
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return s, wg.Wait
|
return s, wg.Wait
|
||||||
|
Reference in New Issue
Block a user