Skip to content

Commit

Permalink
kv: deflake TestStoreRangeMergeWithData
Browse files Browse the repository at this point in the history
Fixes #126249.

This commit deflakes the test by making sure that the merge transaction
does not get aborted after each time we manually advance the clock to
trigger a lease acquisition.

Release note: None
  • Loading branch information
nvanbenschoten committed Jul 17, 2024
1 parent 9c36e05 commit 3ffe5b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/kv/kvserver/client_merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ func TestStoreRangeMergeWithData(t *testing.T) {
func mergeWithData(t *testing.T, retries int64) {
ctx := context.Background()

// Set a long txn liveness threshold so that the merge txn cannot be aborted,
// even when we manually advance the clock to trigger a lease acquisition.
defer txnwait.TestingOverrideTxnLivenessThreshold(time.Hour)()

manualClock := hlc.NewHybridManualClock()
var store *kvserver.Store
// Maybe inject some retryable errors when the merge transaction commits.
Expand Down

0 comments on commit 3ffe5b3

Please sign in to comment.