Skip to content

Commit 16d4030

Browse files
committed
kvserver: deflake TestReplicateRestartAfterTruncationWithRemoveAndReAdd
This test could spend >10s with non-live nodes (at least under stress), so it would trip the timeout in a check in `executeChangeReplicasTxn` that tries to ensure that we don't replicate into an unavailable configuration. Instead of skipping these tests under stress, we enable the testing knob that disables the check. Closes cockroachdb#157203. Closes cockroachdb#156689.
1 parent 72e5734 commit 16d4030

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/kv/kvserver/client_raft_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/liveness/livenesspb"
3737
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/logstore"
3838
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/rditer"
39-
raft "github.com/cockroachdb/cockroach/pkg/raft"
39+
"github.com/cockroachdb/cockroach/pkg/raft"
4040
"github.com/cockroachdb/cockroach/pkg/raft/raftpb"
4141
"github.com/cockroachdb/cockroach/pkg/roachpb"
4242
"github.com/cockroachdb/cockroach/pkg/rpc"
@@ -2294,6 +2294,12 @@ func runReplicateRestartAfterTruncation(t *testing.T, removeBeforeTruncateAndReA
22942294
StickyVFSRegistry: fs.NewStickyRegistry(),
22952295
WallClock: manualClock,
22962296
},
2297+
// In this test, under duress, we can occasionally fail enough
2298+
// heartbeats to exceed the 10s timeout in execChangeReplicasTxn to
2299+
// verify liveness of a post-change quorum.
2300+
//
2301+
// See: https://github.com/cockroachdb/cockroach/issues/156689
2302+
Store: &kvserver.StoreTestingKnobs{AllowDangerousReplicationChanges: true},
22972303
},
22982304
}
22992305
}

0 commit comments

Comments
 (0)