From dce61075c03907a70362878d362b2b95ff06addf Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Wed, 7 Nov 2018 12:00:51 -0800 Subject: Fix flaky TestCacheResolutionTimeout Increase timeout to prevent the entry from being found when there is delay on the address resolution goroutine that doesn't mark the request as failed. PiperOrigin-RevId: 220504789 Change-Id: I7e44fd95d8624bd69962f862fbf5517a81395f2a --- pkg/tcpip/stack/linkaddrcache_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/tcpip/stack/linkaddrcache_test.go b/pkg/tcpip/stack/linkaddrcache_test.go index 651fa17ac..77a09ca86 100644 --- a/pkg/tcpip/stack/linkaddrcache_test.go +++ b/pkg/tcpip/stack/linkaddrcache_test.go @@ -237,8 +237,8 @@ func TestCacheResolutionFailed(t *testing.T) { } func TestCacheResolutionTimeout(t *testing.T) { - resolverDelay := 50 * time.Millisecond - expiration := resolverDelay / 2 + resolverDelay := 500 * time.Millisecond + expiration := resolverDelay / 10 c := newLinkAddrCache(expiration, 1*time.Millisecond, 3) linkRes := &testLinkAddressResolver{cache: c, delay: resolverDelay} -- cgit v1.2.3