mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-22 08:24:25 +01:00
don't wait forever
This commit is contained in:
@@ -124,11 +124,11 @@ func TestCertUpgrade(t *testing.T) {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
r.Logf("reload new v2 config")
|
r.Logf("reload new v2-only config")
|
||||||
err = myC.ReloadConfigString(string(cb))
|
err = myC.ReloadConfigString(string(cb))
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
r.Logf("yay")
|
r.Log("yay, spin until their sees it")
|
||||||
r.Log("spin until their sees it")
|
waitStart := time.Now()
|
||||||
for {
|
for {
|
||||||
assertTunnel(t, myVpnIpNet[0].Addr(), theirVpnIpNet[0].Addr(), myControl, theirControl, r)
|
assertTunnel(t, myVpnIpNet[0].Addr(), theirVpnIpNet[0].Addr(), myControl, theirControl, r)
|
||||||
c := theirControl.GetHostInfoByVpnAddr(myVpnIpNet[0].Addr(), false)
|
c := theirControl.GetHostInfoByVpnAddr(myVpnIpNet[0].Addr(), false)
|
||||||
@@ -141,6 +141,10 @@ func TestCertUpgrade(t *testing.T) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
since := time.Since(waitStart)
|
||||||
|
if since > time.Second*10 {
|
||||||
|
t.Fatal("Cert should be new by now")
|
||||||
|
}
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user