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%
This commit is contained in:
Anis Elleuch 2020-10-22 17:35:32 +01:00 committed by GitHub
parent 5cc23ae052
commit 0e0c53bba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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