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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy