mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-14 15:56:44 +03:00
Fix another flaky test
This commit is contained in:
@@ -1047,6 +1047,11 @@ func TestRejectedRequestsCount(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// The server's worker pool is a separate goroutine, give it
|
||||
// a little bit of time to process the failed connection,
|
||||
// otherwise the test may fail from time to time.
|
||||
time.Sleep(time.Millisecond * 10)
|
||||
|
||||
if cnt := s.GetRejectedConnectionsCount(); cnt != uint32(expectedCount) {
|
||||
t.Errorf("unexpected rejected connections count: %d. Expecting %d",
|
||||
cnt, expectedCount)
|
||||
|
||||
Reference in New Issue
Block a user