mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-14 15:56:44 +03:00
8fe6af3619
* Fix flaky race tests * Drain streamed body in content length test
17 lines
209 B
Go
17 lines
209 B
Go
package fasthttp
|
|
|
|
import (
|
|
"runtime"
|
|
"time"
|
|
)
|
|
|
|
func testTimeout(timeout time.Duration) time.Duration {
|
|
if raceEnabled {
|
|
timeout *= 5
|
|
}
|
|
if runtime.GOOS == "windows" {
|
|
timeout *= 2
|
|
}
|
|
return timeout
|
|
}
|