tests: Lower expectation in addr selection in rand cache dialer (#10739)

Test TestDialContextWithDNSCacheRand was failing sometimes because it depends
on a random selection of addresses when testing random DNS resolution from cache.

Lower addr selection exception to 10%
master
Anis Elleuch 4 years ago committed by GitHub
parent 5cc23ae052
commit 0e0c53bba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/http/dial_dnscache_test.go

@ -132,8 +132,8 @@ func TestDialContextWithDNSCacheRand(t *testing.T) {
for _, c := range count { for _, c := range count {
got := float32(c) / float32(100) got := float32(c) / float32(100)
if got < float32(0.2) { if got < float32(0.1) {
t.Fatalf("expected 0.2 rate got %f", got) t.Fatalf("expected 0.1 rate got %f", got)
} }
} }
} }

Loading…
Cancel
Save