@@ -59,16 +59,19 @@ class SkvbcBackupRestoreTest(ApolloTest):
5959 @with_bft_network (start_replica_cmd , selected_configs = lambda n , f , c : n == 7 )
6060 async def test_checkpoint_propagation_after_restarting_replicas (self , bft_network ):
6161 """
62- Here we trigger a checkpoint, restart all replicas in a random order with 5s delay in-between,
63- both while stopping and starting. We verify checkpoint persisted upon restart and then trigger
62+ Here we trigger a checkpoint, restart all replicas.
63+ We verify checkpoint persisted upon restart and then trigger
6464 another checkpoint. We make sure checkpoint is propagated to all the replicas.
6565 1) Given a BFT network, we make sure all nodes are up
6666 2) Send sufficient number of client requests to trigger checkpoint protocol
67- 3) Stop all replicas in a random order (with 5s delay in between)
68- 4) Start all replicas in a random order (with 5s delay in between)
67+ 3) Stop all replicas in a random order
68+ 4) Start all replicas in a random order
6969 5) Make sure the initial view is stable
7070 6) Send sufficient number of client requests to trigger another checkpoint
7171 7) Make sure checkpoint propagates to all the replicas
72+
73+ Note: UDP configuration waits for 5 seconds until it assumes network communication is established.
74+ A replica can thus trigger a view change if it
7275 """
7376 bft_network .start_all_replicas ()
7477 skvbc = kvbc .SimpleKVBCProtocol (bft_network )
@@ -87,20 +90,15 @@ async def test_checkpoint_propagation_after_restarting_replicas(self, bft_networ
8790 verify_checkpoint_persistency = False
8891 )
8992
90- # stop n replicas in a random order with a delay of 5s in between
91- stopped_replicas = await self ._stop_random_replicas_with_delay (bft_network , delay = 5 ,
92- exclude_replicas = {current_primary })
93- bft_network .stop_replica (current_primary )
94- # start stopped replicas in a random order with a delay of 5s in between
95- bft_network .start_replica (current_primary )
96- await self ._start_random_replicas_with_delay (bft_network , stopped_replicas , delay = 5 )
97-
93+ bft_network .stop_all_replicas ()
94+ bft_network .start_all_replicas ()
95+ stopped_replicas = bft_network .all_replicas ()
9896 # verify checkpoint persistence
9997 log .log_message (message_type = f"Wait for replicas to reach checkpoint" , checkpoint = checkpoint_before + 1 ,
100- replicas = [ current_primary ] + list ( stopped_replicas ) )
98+ replicas = stopped_replicas )
10199 await bft_network .wait_for_replicas_to_checkpoint (
102100 stopped_replicas ,
103- expected_checkpoint_num = lambda ecn : ecn = = checkpoint_before + 1 )
101+ expected_checkpoint_num = lambda ecn : ecn > = checkpoint_before + 1 )
104102
105103 # verify current view is stable
106104 for replica in bft_network .all_replicas ():
0 commit comments