Skip to content

Commit de2af19

Browse files
committed
Merge bitcoin/bitcoin#22987: qa: Fix "RuntimeError: Event loop is closed" on Windows
357f0c7 ci: Enable more functional tests on Windows MSVC task (Hennadii Stepanov) f559326 qa: Fix "RuntimeError: Event loop is closed" on Windows (Hennadii Stepanov) Pull request description: On master (2161a05), 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 357f0c7 🌆 Tree-SHA512: d0ba85be81d55c934959ce7402a9c726598125e9751a1de179d16759d0e8b8a915de879c3a62c12d3564c5e0d9649ebd86963744449626efaa42d9eaa99ad3d0
2 parents e69cbac + 357f0c7 commit de2af19

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.cirrus.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ task:
7575
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
7676

7777
task:
78-
name: "Win64 native [unit tests, no functional tests] [msvc]"
78+
name: "Win64 native [msvc]"
7979
<< : *FILTER_TEMPLATE
8080
windows_container:
8181
cpu: 4
@@ -93,6 +93,7 @@ task:
9393
QTBASEDIR: 'C:\Qt5.12.11_x64_static_vs2019_160900'
9494
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
9595
IgnoreWarnIntDirInTempDetected: 'true'
96+
EXCLUDE_TESTS: 'feature_addrman.py,feature_bip68_sequence.py,feature_fee_estimation.py,mining_prioritisetransaction.py,p2p_getaddr_caching.py,p2p_invalid_locator.py,p2p_invalid_tx.py,rpc_misc.py,rpc_net.py,wallet_avoidreuse.py,wallet_descriptor.py,wallet_groups.py,wallet_keypool.py'
9697
merge_script:
9798
- git config --global user.email "[email protected]"
9899
- git config --global user.name "ci"
@@ -146,7 +147,8 @@ task:
146147
- python test\util\test_runner.py
147148
- python test\util\rpcauth-test.py
148149
functional_tests_script:
149-
- python test\functional\test_runner.py --ci --quiet --combinedlogslen=4000 --jobs=4 --timeout-factor=8 rpc_help feature_config_args rpc_signer feature_presegwit_node_upgrade "tool_wallet.py --descriptors" --failfast # TODO enable '--extended' and remove cherry-picked test list
150+
# TODO enable '--extended' and drop '--exclude'.
151+
- python test\functional\test_runner.py --ci --quiet --combinedlogslen=4000 --jobs=4 --timeout-factor=8 --exclude %EXCLUDE_TESTS% --failfast
150152

151153
task:
152154
name: 'ARM [unit tests, no functional tests] [bullseye]'

test/functional/test_framework/p2p.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@ def __init__(self):
577577

578578
NetworkThread.listeners = {}
579579
NetworkThread.protos = {}
580+
if sys.platform == 'win32':
581+
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
580582
NetworkThread.network_event_loop = asyncio.new_event_loop()
581583

582584
def run(self):

0 commit comments

Comments
 (0)