Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Fix test_get_clouds_concurrent on python 3.8 windows #11864

Merged
merged 1 commit into from
Jan 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/azure-cli-core/azure/cli/core/tests/test_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,11 @@ def test_remove_known_cloud(self):

def test_get_clouds_concurrent(self):
with mock.patch('azure.cli.core.cloud.CLOUD_CONFIG_FILE', tempfile.mkstemp()[1]) as config_file:
pool_size = 100
# Max pool_size is 61, otherwise exception will be thrown on Python 3.8 Windows:
# File "...Python38\lib\multiprocessing\connection.py", line 810, in _exhaustive_wait
# res = _winapi.WaitForMultipleObjects(L, False, timeout)
# ValueError: need at most 63 handles, got a sequence of length 102
pool_size = 20
p = multiprocessing.Pool(pool_size)
p.map(_helper_get_clouds, range(pool_size))
p.close()
Expand Down