diff options
author | Ava Chow <github@achow101.com> | 2024-04-22 18:12:28 -0400 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-04-22 18:20:02 -0400 |
commit | 10bd32a1c96802728ef5c0e7504e09eff423eed6 (patch) | |
tree | 0c90ea37fceabc1496426be7c7ac4fb45088c85c /test | |
parent | dec74c035b80afceae70d064467d25bef6cf5630 (diff) | |
parent | fa6c300a9926a1d35fdd0a80f59ea39769bd2596 (diff) | |
download | bitcoin-10bd32a1c96802728ef5c0e7504e09eff423eed6.tar.xz |
Merge bitcoin/bitcoin#29933: test: Fix intermittent timeout in p2p_tx_download.py
fa6c300a9926a1d35fdd0a80f59ea39769bd2596 test: Fix intermittent timeout in p2p_tx_download.py (MarcoFalke)
Pull request description:
Currently the test passes, but may fail during shutdown, because blocks and transactions are synced with `NUM_INBOUND` * `self.num_nodes` peers, which may take a long time.
There is no need for this test to have this amount of inbounds.
So avoid the extraneous inbounds to speed up the test and avoid the intermittent test failures.
ACKs for top commit:
instagibbs:
ACK fa6c300a9926a1d35fdd0a80f59ea39769bd2596
fjahr:
Thanks, ACK fa6c300a9926a1d35fdd0a80f59ea39769bd2596
achow101:
ACK fa6c300a9926a1d35fdd0a80f59ea39769bd2596
theStack:
ACK fa6c300a9926a1d35fdd0a80f59ea39769bd2596
Tree-SHA512: 0a480fd1db293ed8571ae629557cf81d5a79ec883e9e635f22c8a7cf48427161249ad2180b66c67661306f696c977b8e06ad520bd11911f119c9c95b3ffc9134
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/p2p_tx_download.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/test/functional/p2p_tx_download.py b/test/functional/p2p_tx_download.py index ae1edec2f1..7a50f1e605 100755 --- a/test/functional/p2p_tx_download.py +++ b/test/functional/p2p_tx_download.py @@ -284,17 +284,22 @@ class TxDownloadTest(BitcoinTestFramework): # Run each test against new bitcoind instances, as setting mocktimes has long-term effects on when # the next trickle relay event happens. - for test in [self.test_in_flight_max, self.test_inv_block, self.test_tx_requests, - self.test_rejects_filter_reset]: + for test, with_inbounds in [ + (self.test_in_flight_max, True), + (self.test_inv_block, True), + (self.test_tx_requests, True), + (self.test_rejects_filter_reset, False), + ]: self.stop_nodes() self.start_nodes() self.connect_nodes(1, 0) # Setup the p2p connections self.peers = [] - for node in self.nodes: - for _ in range(NUM_INBOUND): - self.peers.append(node.add_p2p_connection(TestP2PConn())) - self.log.info("Nodes are setup with {} incoming connections each".format(NUM_INBOUND)) + if with_inbounds: + for node in self.nodes: + for _ in range(NUM_INBOUND): + self.peers.append(node.add_p2p_connection(TestP2PConn())) + self.log.info("Nodes are setup with {} incoming connections each".format(NUM_INBOUND)) test() |