chore: update testutil chan helpers (#17408)

This commit is contained in:
ケイラ
2025-04-16 09:37:09 -07:00
committed by GitHub
parent 2a76f5028e
commit f670bc31f5
45 changed files with 582 additions and 559 deletions

View File

@ -90,7 +90,7 @@ func TestAgentConnectionMonitor_ContextCancel(t *testing.T) {
fConn.requireEventuallyClosed(t, websocket.StatusGoingAway, "canceled")
// make sure we got at least one additional update on close
_ = testutil.RequireRecvCtx(ctx, t, done)
_ = testutil.TryReceive(ctx, t, done)
m := fUpdater.getUpdates()
require.Greater(t, m, n)
}
@ -293,7 +293,7 @@ func TestAgentConnectionMonitor_StartClose(t *testing.T) {
uut.close()
close(closed)
}()
_ = testutil.RequireRecvCtx(ctx, t, closed)
_ = testutil.TryReceive(ctx, t, closed)
}
type fakePingerCloser struct {