|
|
@ -181,9 +181,10 @@ func Test_MultiNodeNode_CommitIndexes(t *testing.T) {
|
|
|
|
|
|
|
|
|
|
|
|
// First node to join should also reflect the new cluster config
|
|
|
|
// First node to join should also reflect the new cluster config
|
|
|
|
// command.
|
|
|
|
// command.
|
|
|
|
if exp, got := uint64(5), s1.raft.CommitIndex(); exp != got {
|
|
|
|
testPoll(t, func() bool {
|
|
|
|
t.Fatalf("wrong commit index, got: %d, exp %d", got, exp)
|
|
|
|
// The config change command comming through the log due to s2 joining is not instant.
|
|
|
|
}
|
|
|
|
return s1.raft.CommitIndex() == 5
|
|
|
|
|
|
|
|
}, 50*time.Millisecond, 2*time.Second)
|
|
|
|
if exp, got := uint64(4), s1.raftTn.CommandCommitIndex(); exp != got {
|
|
|
|
if exp, got := uint64(4), s1.raftTn.CommandCommitIndex(); exp != got {
|
|
|
|
t.Fatalf("wrong command commit index, got: %d, exp %d", got, exp)
|
|
|
|
t.Fatalf("wrong command commit index, got: %d, exp %d", got, exp)
|
|
|
|
}
|
|
|
|
}
|
|
|
|