Simplify tests and avoid unnecessary race conditions.

This commit is contained in:
Jay
2026-04-15 13:47:34 -04:00
parent b128a021de
commit d002c19889
5 changed files with 18 additions and 77 deletions

View File

@@ -125,14 +125,9 @@ func TestStartReader(t *testing.T) {
incomingData <- mockIncomingData{msgType: websocket.TextMessage, data: []byte("test"), err: nil}
assert.Eventually(t, func() bool {
select {
case <-conn.Incoming():
return true
default:
return false
}
}, testTimeout, testTick)
select {
case <-conn.Incoming():
}
assert.Eventually(t, func() bool {
select {