From 5a60781919e1695270ec25ce098c9797f61d03c6 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Wed, 17 Nov 2021 13:41:43 -0800 Subject: [PATCH] wgengine/magicsock: increase TestDiscokeyChange connection timeout I believe that this should eliminate the flakiness. If GitHub CI manages to be even slower that can be believed (and I can believe a lot at this point), then we should roll this back and make some more invasive changes. Updates #654 Fixes #3247 (I hope) Signed-off-by: Josh Bleecher Snyder --- wgengine/magicsock/magicsock_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wgengine/magicsock/magicsock_test.go b/wgengine/magicsock/magicsock_test.go index ef094b3a2..45e0f44fb 100644 --- a/wgengine/magicsock/magicsock_test.go +++ b/wgengine/magicsock/magicsock_test.go @@ -955,8 +955,9 @@ func testActiveDiscovery(t *testing.T, d *devices) { func mustDirect(t *testing.T, logf logger.Logf, m1, m2 *magicStack) { lastLog := time.Now().Add(-time.Minute) - // 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) { + // See https://github.com/tailscale/tailscale/issues/654 + // and https://github.com/tailscale/tailscale/issues/3247 for discussions of this deadline. + for deadline := time.Now().Add(30 * 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)