-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raft scenarios falsifying Heidi's hypothesis about raft.h's behavior.
Execute with: ```shell .../build $ python3 ../tests/raft_scenarios_runner.py ./raft_driver ../tests/raft_scenarios/5879_deprecated ```
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
nodes,0,1 | ||
connect,0,1 | ||
|
||
# Node 0 starts first, and begins sending messages first | ||
periodic_one,0,110 | ||
dispatch_all | ||
|
||
periodic_all,30 | ||
dispatch_all | ||
|
||
state_all | ||
assert_is_primary,0 | ||
assert_is_backup,1 | ||
|
||
## ... with the same logs upto index 7. | ||
replicate,1,txAtIdx1 | ||
replicate,1,txAtIdx2 | ||
replicate,1,txAtIdx3 | ||
replicate,1,txAtIdx4 | ||
replicate,1,txAtIdx5 | ||
replicate,1,txAtIdx6 | ||
emit_signature,1 | ||
periodic_all,30 | ||
dispatch_all | ||
|
||
assert_commit_idx,0,7 | ||
assert_commit_idx,1,0 | ||
|
||
periodic_all,30 | ||
dispatch_all | ||
assert_state_sync | ||
|
||
assert_commit_idx,0,7 | ||
assert_commit_idx,1,7 | ||
|
||
## At index 8, the leader n2 reconfigures to remove n1. | ||
replicate_new_configuration,1,0 | ||
|
||
periodic_all,30 | ||
dispatch_all | ||
|
||
state_all | ||
assert_is_primary,0 | ||
assert_is_backup,1 | ||
## Index 9 is a signature, index 10 some random transaction and index 11 is a signature. | ||
emit_signature,1 | ||
assert_commit_idx,0,7 | ||
|
||
replicate,1,txAt10 | ||
assert_commit_idx,0,7 | ||
|
||
emit_signature,1 | ||
assert_commit_idx,0,7 | ||
|
||
|
||
## When the ACI action taken by n2, it should be able to commit index 11 but instead it will commit index 9. | ||
periodic_all,30 | ||
dispatch_all | ||
|
||
assert_is_primary,0 | ||
assert_is_backup,1 | ||
assert_is_retired,1 | ||
|
||
assert_commit_idx,0,11 | ||
assert_commit_idx,1,7 |