test: Avoid shutdown race in NetworkThread

This commit is contained in:
MarcoFalke
2025-08-06 09:41:13 +02:00
parent d8fe258cd6
commit fa6db79302

View File

@@ -345,6 +345,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
self.log.debug('Setting up network thread')
self.network_thread = NetworkThread()
self.network_thread.start()
self.wait_until(lambda: self.network_thread.network_event_loop.is_running())
if self.options.usecli:
if not self.supports_cli: