Skip to content

Commit

Permalink
GH-13 Fix pause/resume
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Apr 29, 2024
1 parent 87028c0 commit 35fc2ec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/disaster_recovery_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,17 @@
currentLIB = node0.getIrreversibleBlockNum()

Print("Pause production on Node0")
ret_json = node0.processUrllibRequest("producer", "pause", "localhost:9877")
ret_json = node0.processUrllibRequest("producer", "pause")
assert node0.waitForLibToAdvance(), "Node0 did not advance LIB after pause"

Print("Disconnect the producing node (Node0) from peer Node1")
ret_json = node0.processUrllibRequest("net", "disconnect", "localhost:9877")
assert node0.waitForHeadToAdvance(blocksToAdvance=5), "Node0 head not advancing after disconnect"
assert not node0.waitForLibToAdvance(timeout=10), "Node0 LIB still advancing after disconnect"

Print("Resume production on Node0")
ret_json = node0.processUrllibRequest("producer", "resume")
assert node0.waitForHeadToAdvance(blocksToAdvance=2)

assert not node1.waitForHeadToAdvance(timeout=5), "Node1 head still advancing after disconnect"

for node in [node0, node1, node2, node3, node4]:
Expand Down

0 comments on commit 35fc2ec

Please sign in to comment.