Skip to content

Commit

Permalink
Update election
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou committed Oct 25, 2023
1 parent a175e34 commit 92b79a4
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions tests/raft_scenarios/election
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
nodes,0,1,2
connect,0,1
connect,1,2
connect,0,2

# Node 0 starts first, and begins sending messages first
# Node 0 starts first, and wins the first election
start_node
periodic_one,0,110
dispatch_all

assert_is_primary,0
assert_is_backup,1
assert_is_backup,2
# Add two more nodes
trust_node,1,1
trust_node,1,2
emit_signature,1
periodic_all,10
dispatch_all

# Commit reconfiguration
periodic_all,10
dispatch_all

state_all
# Three node network is ready
assert_is_primary,0
assert_is_backup,1
assert_is_backup,2
assert_state_sync

replicate,1,helloworld
emit_signature,1
Expand Down

0 comments on commit 92b79a4

Please sign in to comment.