Skip to content

Commit

Permalink
Update TestNRGSimple to not pass trivially
Browse files Browse the repository at this point in the history
Using 0 as expected total can make the test complete successfully before 
any delta is processed via RAFT.
  • Loading branch information
mprimi committed Dec 7, 2023
1 parent 9f2da61 commit 6789d2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/raft_test.go
Expand Up @@ -32,10 +32,10 @@ func TestNRGSimple(t *testing.T) {
rg.waitOnLeader()
// Do several state transitions.
rg.randomMember().(*stateAdder).proposeDelta(11)
rg.randomMember().(*stateAdder).proposeDelta(11)
rg.randomMember().(*stateAdder).proposeDelta(-22)
rg.randomMember().(*stateAdder).proposeDelta(22)
rg.randomMember().(*stateAdder).proposeDelta(33)
// Wait for all members to have the correct state.
rg.waitOnTotal(t, 0)
rg.waitOnTotal(t, 66)
}

func TestNRGSnapshotAndRestart(t *testing.T) {
Expand Down

0 comments on commit 6789d2d

Please sign in to comment.