Skip to content

Commit

Permalink
rpc: increase timeout for TestClockOffsetInPingRequest
Browse files Browse the repository at this point in the history
Previously this test had the `RPCHeartbeatInterval` and
`RPCHeartbeatTimeout` both set at 100ms. Normally the
`RPCHeartbeatTimeout` is set at 3x the interval. During race builds this
provides enough extra cushion that the test should pass.

Epic: none
Fixes: cockroachdb#136703

Release note: None
  • Loading branch information
andrewbaptist committed Dec 5, 2024
1 parent 8bd5149 commit d0cd9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/rpc/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func testClockOffsetInPingRequestInternal(t *testing.T, clientOnly bool) {
clientOpts := opts
// Experimentally, values below 50ms seem to incur flakiness.
clientOpts.RPCHeartbeatInterval = 100 * time.Millisecond
clientOpts.RPCHeartbeatTimeout = 100 * time.Millisecond
clientOpts.RPCHeartbeatTimeout = 200 * time.Millisecond
clientOpts.ClientOnly = clientOnly
clientOpts.OnOutgoingPing = func(ctx context.Context, req *PingRequest) error {
select {
Expand Down

0 comments on commit d0cd9ba

Please sign in to comment.