Merge bitcoin/bitcoin#34369: test: Scale NetworkThread close timeout with timeout_factor

fab055c907f1ab9ecac49e3d72909289a3b08c2d test: Scale NetworkThread close timeout with timeout_factor (MarcoFalke)

Pull request description:

  Not sure if this fixes https://github.com/bitcoin/bitcoin/issues/34248, but scaling here probably makes sense, considering some CI setups run in nested VMs with a different arch system-qemu.

ACKs for top commit:
  hebasto:
    ACK fab055c907f1ab9ecac49e3d72909289a3b08c2d, the diff looks reasonable.

Tree-SHA512: 98f9b0bdc3b02b692a14129f88c05f2df0d1e11e4167ff5d0cc6a3a6efd8994a743e969e83c71cb534537f134e07ba9a5cba3eb2010a6b6cf69bec959faf2c43
This commit is contained in:
Hennadii Stepanov 2026-01-21 16:41:46 +00:00
commit 3ea2b6fe18
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F
2 changed files with 2 additions and 2 deletions

View File

@ -743,7 +743,7 @@ class NetworkThread(threading.Thread):
"""Start the network thread."""
self.network_event_loop.run_forever()
def close(self, *, timeout=10):
def close(self, *, timeout):
"""Close the connections and network event loop."""
self.network_event_loop.call_soon_threadsafe(self.network_event_loop.stop)
wait_until_helper_internal(lambda: not self.network_event_loop.is_running(), timeout=timeout)

View File

@ -278,7 +278,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
pdb.set_trace()
self.log.debug('Closing down network thread')
self.network_thread.close()
self.network_thread.close(timeout=self.options.timeout_factor * 10)
if self.success == TestStatus.FAILED:
self.log.info("Not stopping nodes as test failed. The dangling processes will be cleaned up later.")
else: