Skip to content

Commit fcc4025

Browse files
author
MarcoFalke
committed
Merge #16459: [qa] Fix race condition in example_test.py
d9ab0ff [qa] Fix race condition in example_test.py (Suhas Daftuar) Pull request description: There's a race between sending a getdata for a bunch of blocks with the node receiving those blocks from a peer, which could cause test failure. Fix this. ACKs for top commit: MarcoFalke: ACK d9ab0ff laanwj: ACK d9ab0ff promag: ACK d9ab0ff. Tree-SHA512: c891f209eb2492f44e47da52ee6df950ff874ae26d2739011aca940d1caff6cedbac032b6509adbed07044c14fd711ba9d4d0e35c0f70bb2691f2ea4a46672ed
2 parents fe00192 + d9ab0ff commit fcc4025

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/functional/example_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,15 @@ def run_test(self):
186186
self.log.info("Connect node2 and node1")
187187
connect_nodes(self.nodes[1], 2)
188188

189+
self.log.info("Wait for node2 to receive all the blocks from node1")
190+
self.sync_all()
191+
189192
self.log.info("Add P2P connection to node2")
190193
self.nodes[0].disconnect_p2ps()
191194

192195
self.nodes[2].add_p2p_connection(BaseNode())
193196

194-
self.log.info("Wait for node2 reach current tip. Test that it has propagated all the blocks to us")
197+
self.log.info("Test that node2 propagates all the blocks to us")
195198

196199
getdata_request = msg_getdata()
197200
for block in blocks:

0 commit comments

Comments
 (0)