aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-09-18 16:00:24 +0800
committerfanquake <fanquake@gmail.com>2021-09-18 16:49:19 +0800
commitde2af19dc8e8c848afbc4b43b9b4092fe263364f (patch)
treeceb5f9dc98f6fe7cd2f74f0e46bb19f8de029049 /test/functional/test_framework
parente69cbac628bfdca4a8e4ead821190eaf5b6b3d07 (diff)
parent357f0c723308b296c6250946c26cf476d9ecfda2 (diff)
Merge bitcoin/bitcoin#22987: qa: Fix "RuntimeError: Event loop is closed" on Windows
357f0c723308b296c6250946c26cf476d9ecfda2 ci: Enable more functional tests on Windows MSVC task (Hennadii Stepanov) f55932678facea2c36bc0708994dbef327a7df09 qa: Fix "RuntimeError: Event loop is closed" on Windows (Hennadii Stepanov) Pull request description: On master (2161a058552ac938f2079b311a2d12f5d1772d01), running functional tests that use the P2P interface ends with an error: ``` RuntimeError: Event loop is closed ``` This PR fixes this bug, and enables more functional tests on Windows MSVC CI task. More details about bugfix: - [What’s New In Python 3.7](https://docs.python.org/3/whatsnew/3.7.html#asyncio) - https://bugs.python.org/issue33792 - actual [change](https://docs.python.org/3.8/library/asyncio-policy.html#asyncio.WindowsSelectorEventLoopPolicy) done in Python 3.8 Excluded tests, that are listed in the `EXCLUDE_TESTS` environment variable, need more thorough investigation to be enabled. ACKs for top commit: MarcoFalke: review ACK 357f0c723308b296c6250946c26cf476d9ecfda2 🌆 Tree-SHA512: d0ba85be81d55c934959ce7402a9c726598125e9751a1de179d16759d0e8b8a915de879c3a62c12d3564c5e0d9649ebd86963744449626efaa42d9eaa99ad3d0
Diffstat (limited to 'test/functional/test_framework')
-rwxr-xr-xtest/functional/test_framework/p2p.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/functional/test_framework/p2p.py b/test/functional/test_framework/p2p.py
index b7d5bd8fab..ec563cc290 100755
--- a/test/functional/test_framework/p2p.py
+++ b/test/functional/test_framework/p2p.py
@@ -577,6 +577,8 @@ class NetworkThread(threading.Thread):
NetworkThread.listeners = {}
NetworkThread.protos = {}
+ if sys.platform == 'win32':
+ asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
NetworkThread.network_event_loop = asyncio.new_event_loop()
def run(self):