mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-14 01:19:09 +02:00
Capture the settle test start time before the recovery goroutine
This commit is contained in:
@@ -16,12 +16,12 @@ func TestWaitForNetworkSettlesAfterOutage(t *testing.T) {
|
|||||||
g := NewGuard(nil, 0, ns)
|
g := NewGuard(nil, 0, ns)
|
||||||
|
|
||||||
const outage = 2 * verdictSettleWindow
|
const outage = 2 * verdictSettleWindow
|
||||||
|
start := time.Now()
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(outage)
|
time.Sleep(outage)
|
||||||
ns.Set(true)
|
ns.Set(true)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
start := time.Now()
|
|
||||||
ok := g.waitForNetwork(context.Background())
|
ok := g.waitForNetwork(context.Background())
|
||||||
elapsed := time.Since(start)
|
elapsed := time.Since(start)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user