From 241b0a6d7f6dd70cdd9b14523e69fce9f8cea602 Mon Sep 17 00:00:00 2001 From: JackDoan Date: Wed, 10 Sep 2025 11:47:45 -0500 Subject: [PATCH] don't wait forever --- e2e/tunnels_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/e2e/tunnels_test.go b/e2e/tunnels_test.go index dc278ba..af2c561 100644 --- a/e2e/tunnels_test.go +++ b/e2e/tunnels_test.go @@ -124,11 +124,11 @@ func TestCertUpgrade(t *testing.T) { panic(err) } - r.Logf("reload new v2 config") + r.Logf("reload new v2-only config") err = myC.ReloadConfigString(string(cb)) assert.NoError(t, err) - r.Logf("yay") - r.Log("spin until their sees it") + r.Log("yay, spin until their sees it") + waitStart := time.Now() for { assertTunnel(t, myVpnIpNet[0].Addr(), theirVpnIpNet[0].Addr(), myControl, theirControl, r) c := theirControl.GetHostInfoByVpnAddr(myVpnIpNet[0].Addr(), false) @@ -141,6 +141,10 @@ func TestCertUpgrade(t *testing.T) { break } } + since := time.Since(waitStart) + if since > time.Second*10 { + t.Fatal("Cert should be new by now") + } time.Sleep(time.Second) }