From a5d701095b8812837bc4df9d4cad0b5b3884774e Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Fri, 11 Sep 2020 17:20:52 -0700 Subject: [PATCH] wgengine/magicsock: increase test timeout to reduce flakiness Updates #654. See that issue for a discussion of why this timeout reduces flakiness, and what next steps are. Signed-off-by: Josh Bleecher Snyder --- wgengine/magicsock/magicsock_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wgengine/magicsock/magicsock_test.go b/wgengine/magicsock/magicsock_test.go index 7530861b2..8b13277a6 100644 --- a/wgengine/magicsock/magicsock_test.go +++ b/wgengine/magicsock/magicsock_test.go @@ -812,7 +812,8 @@ func testActiveDiscovery(t *testing.T, d *devices) { mustDirect := func(m1, m2 *magicStack) { lastLog := time.Now().Add(-time.Minute) - for deadline := time.Now().Add(5 * time.Second); time.Now().Before(deadline); time.Sleep(10 * time.Millisecond) { + // See https://github.com/tailscale/tailscale/issues/654 for a discussion of this deadline. + for deadline := time.Now().Add(10 * time.Second); time.Now().Before(deadline); time.Sleep(10 * time.Millisecond) { pst := m1.Status().Peer[m2.Public()] if pst.CurAddr != "" { logf("direct link %s->%s found with addr %s", m1, m2, pst.CurAddr)