Capture the settle test start time before the recovery goroutine

This commit is contained in:
Zoltán Papp
2026-08-18 14:44:14 +02:00
parent 31c77805ce
commit d7b3f2124e

View File

@@ -16,12 +16,12 @@ func TestWaitForNetworkSettlesAfterOutage(t *testing.T) {
g := NewGuard(nil, 0, ns)
const outage = 2 * verdictSettleWindow
start := time.Now()
go func() {
time.Sleep(outage)
ns.Set(true)
}()
start := time.Now()
ok := g.waitForNetwork(context.Background())
elapsed := time.Since(start)