Skip to content

Commit

Permalink
kvserver: deflake a deflake attempt for ..
Browse files Browse the repository at this point in the history
...TestBackpressureNotAppliedWhenReducingRangeSize. Fixes cockroachdb#75609, a
regression we introduced in cockroachdb#75598. When waiting for a span config to
materialize on a given node, we were accidentally tripping up on it not
being found on the original. Not sure we this slipped CI.

Release note: None
  • Loading branch information
irfansharif committed Jan 27, 2022
1 parent 11da0cf commit e7dcb09
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/kv/kvserver/client_replica_backpressure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,14 @@ func TestBackpressureNotAppliedWhenReducingRangeSize(t *testing.T) {
moveTableToNewStore(t, tc, args, tablePrefix)

// Ensure that the new replica has applied the same config.
waitForSpanConfig(t, tc, tablePrefix, newMax)
testutils.SucceedsSoon(t, func() error {
_, r := getFirstStoreReplica(t, tc.Server(1), tablePrefix)
conf := r.SpanConfig()
if conf.RangeMaxBytes != newMax {
return fmt.Errorf("expected %d, got %d", newMax, conf.RangeMaxBytes)
}
return nil
})

s, repl := getFirstStoreReplica(t, tc.Server(1), tablePrefix)
s.SetReplicateQueueActive(false)
Expand Down

0 comments on commit e7dcb09

Please sign in to comment.