mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-31 10:41:08 +00:00
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:
commit
3ea2b6fe18
@ -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)
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user