diff --git a/pkg/kv/kvserver/client_replica_backpressure_test.go b/pkg/kv/kvserver/client_replica_backpressure_test.go index 9470577c25e9..bdd83322498e 100644 --- a/pkg/kv/kvserver/client_replica_backpressure_test.go +++ b/pkg/kv/kvserver/client_replica_backpressure_test.go @@ -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)