test: Fix intermittent timeout in p2p_tx_download.py

This commit is contained in:
MarcoFalke 2024-04-22 15:24:47 +02:00
parent ba7c67f609
commit fa6c300a99
No known key found for this signature in database
1 changed files with 11 additions and 6 deletions

View File

@ -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()