Skip to content

Commit

Permalink
fix test_get_clouds_concurrent on python 3.8 windows (#11864)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiasli authored and Jianhui Harold committed Jan 17, 2020
1 parent a68970c commit 92f215e
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 92f215e

Please sign in to comment.