diff --git a/providers/amazon/tests/unit/amazon/aws/executors/eks/test__client_factory.py b/providers/amazon/tests/unit/amazon/aws/executors/eks/test__client_factory.py index 29ffa632d0ca1..45306e27316a5 100644 --- a/providers/amazon/tests/unit/amazon/aws/executors/eks/test__client_factory.py +++ b/providers/amazon/tests/unit/amazon/aws/executors/eks/test__client_factory.py @@ -21,6 +21,7 @@ import signal import tempfile import threading +import time from base64 import b64encode from concurrent.futures import ThreadPoolExecutor from pathlib import Path @@ -152,6 +153,8 @@ def test_concurrent_builds_never_change_sts_regional_endpoints_env_var(self, moc def watch(): while building.is_set(): seen.add(os.environ.get("AWS_STS_REGIONAL_ENDPOINTS")) + # A bare spin loop holds the GIL against the builders and can push the test past its timeout. + time.sleep(0.001) building.set() watcher = threading.Thread(target=watch)