diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-07-25 12:54:05 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-07-25 12:54:09 -0400 |
commit | fcc4025c1255bec81eb724c6af289fec25ac03a2 (patch) | |
tree | a3ce53b7617ad8acfa3f8d8e521872f366c3aed5 | |
parent | fe001925f803ee9281c73da1265c401ba6a2b5ca (diff) | |
parent | d9ab0ffa386f2dd8d05852563d5011b3cb501df8 (diff) |
Merge #16459: [qa] Fix race condition in example_test.py
d9ab0ffa386f2dd8d05852563d5011b3cb501df8 [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 d9ab0ffa386f2dd8d05852563d5011b3cb501df8
laanwj:
ACK d9ab0ffa386f2dd8d05852563d5011b3cb501df8
promag:
ACK d9ab0ffa386f2dd8d05852563d5011b3cb501df8.
Tree-SHA512: c891f209eb2492f44e47da52ee6df950ff874ae26d2739011aca940d1caff6cedbac032b6509adbed07044c14fd711ba9d4d0e35c0f70bb2691f2ea4a46672ed
-rwxr-xr-x | test/functional/example_test.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/example_test.py b/test/functional/example_test.py index a2726763d0..70dfe81d4e 100755 --- a/test/functional/example_test.py +++ b/test/functional/example_test.py @@ -186,12 +186,15 @@ class ExampleTest(BitcoinTestFramework): self.log.info("Connect node2 and node1") connect_nodes(self.nodes[1], 2) + self.log.info("Wait for node2 to receive all the blocks from node1") + self.sync_all() + self.log.info("Add P2P connection to node2") self.nodes[0].disconnect_p2ps() self.nodes[2].add_p2p_connection(BaseNode()) - self.log.info("Wait for node2 reach current tip. Test that it has propagated all the blocks to us") + self.log.info("Test that node2 propagates all the blocks to us") getdata_request = msg_getdata() for block in blocks: |