Skip to content

Commit 63572d9

Browse files
authored
fix: loosen timing checks for heartbeats (#15923)
Fixes #15782. I believe that Windows doesn't always have high-resolution timers available, so this PR loosens the check for PG Coordinator heartbeats, to avoid flakes like: https://github.com/coder/coder/actions/runs/12397381823/job/34607639048
1 parent 9ef22be commit 63572d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

enterprise/tailnet/pgcoord_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ func TestPGCoordinatorSingle_SendsHeartbeats(t *testing.T) {
410410
}
411411
require.Greater(t, heartbeats[0].Sub(start), time.Duration(0))
412412
require.Greater(t, heartbeats[1].Sub(start), time.Duration(0))
413-
return assert.Greater(t, heartbeats[1].Sub(heartbeats[0]), tailnet.HeartbeatPeriod*9/10)
413+
return assert.Greater(t, heartbeats[1].Sub(heartbeats[0]), tailnet.HeartbeatPeriod*3/4)
414414
}, testutil.WaitMedium, testutil.IntervalMedium)
415415
}
416416

0 commit comments

Comments
 (0)