From 0e0c53bba412cc16a989cd2b6af810ac5c892fc4 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Thu, 22 Oct 2020 17:35:32 +0100 Subject: [PATCH] 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% --- cmd/http/dial_dnscache_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/http/dial_dnscache_test.go b/cmd/http/dial_dnscache_test.go index 2833a1a84..f2f2951d4 100644 --- a/cmd/http/dial_dnscache_test.go +++ b/cmd/http/dial_dnscache_test.go @@ -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) } } }