diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-11-07 12:00:51 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-11-07 12:01:48 -0800 |
commit | dce61075c03907a70362878d362b2b95ff06addf (patch) | |
tree | 5fcbcf5a0cf65049cd28645709b93330b10e69ac | |
parent | 4af791f87cb28db87a2ab963a2bf60e15db64f6e (diff) |
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
-rw-r--r-- | pkg/tcpip/stack/linkaddrcache_test.go | 4 |
1 files 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} |