1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #39552 from ddebroy/fix-39544

Be more conservative for Windows in TestFrequency for Splunk
This commit is contained in:
Sebastiaan van Stijn 2019-07-18 21:02:27 +02:00 committed by GitHub
commit 9b67b40e1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -925,7 +925,12 @@ func TestFrequency(t *testing.T) {
// 1 to verify connection and 10 to verify that we have sent messages with required frequency, // 1 to verify connection and 10 to verify that we have sent messages with required frequency,
// but because frequency is too small (to keep test quick), instead of 11, use 9 if context switches will be slow // but because frequency is too small (to keep test quick), instead of 11, use 9 if context switches will be slow
if hec.numOfRequests < 9 { expectedRequests := 9
if runtime.GOOS == "windows" {
// sometimes in Windows, this test fails with number of requests showing 8. So be more conservative.
expectedRequests = 7
}
if hec.numOfRequests < expectedRequests {
t.Fatalf("Unexpected number of requests %d", hec.numOfRequests) t.Fatalf("Unexpected number of requests %d", hec.numOfRequests)
} }