diff --git a/wgengine/watchdog_test.go b/wgengine/watchdog_test.go index 4c86d8ebe..7487d4827 100644 --- a/wgengine/watchdog_test.go +++ b/wgengine/watchdog_test.go @@ -24,6 +24,8 @@ func TestWatchdog(t *testing.T) { e = NewWatchdog(e) e.(*watchdogEngine).maxWait = 150 * time.Millisecond + e.(*watchdogEngine).logf = t.Logf + e.(*watchdogEngine).fatalf = t.Fatalf e.RequestStatus() e.RequestStatus() @@ -65,5 +67,9 @@ func TestWatchdog(t *testing.T) { case <-time.After(3 * time.Second): t.Fatalf("watchdog failed to fire") } + + usEngine.wgLock.Unlock() + wdEngine.fatalf = t.Fatalf + wdEngine.Close() }) }