Skip to content

Commit

Permalink
kvserver: deflake TestReplicateQueue{UpAndDownReplicateNonVoters,Shou…
Browse files Browse the repository at this point in the history
…ldQueueNonVoter}

These tests altered `RANGE DEFAULT` and expect the changes to apply to
the scratch range. This is gated behind a testing knob with the move to
the span configurations infrastructure. This patch adds the testing
knob.

Closes #74995

Release note: None
  • Loading branch information
arulajmani authored and Gerardo Torres committed Jan 18, 2022
1 parent 6e72958 commit 98195e6
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion pkg/kv/kvserver/replicate_queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,16 @@ func TestReplicateQueueUpAndDownReplicateNonVoters(t *testing.T) {

ctx := context.Background()
tc := testcluster.StartTestCluster(t, 1,
base.TestClusterArgs{ReplicationMode: base.ReplicationAuto},
base.TestClusterArgs{
ReplicationMode: base.ReplicationAuto,
ServerArgs: base.TestServerArgs{
Knobs: base.TestingKnobs{
SpanConfig: &spanconfig.TestingKnobs{
ConfigureScratchRange: true,
},
},
},
},
)
defer tc.Stopper().Stop(context.Background())

Expand Down Expand Up @@ -835,6 +844,11 @@ func TestReplicateQueueShouldQueueNonVoter(t *testing.T) {
},
},
},
Knobs: base.TestingKnobs{
SpanConfig: &spanconfig.TestingKnobs{
ConfigureScratchRange: true,
},
},
}
}

Expand Down

0 comments on commit 98195e6

Please sign in to comment.