diff --git a/tests/test_caching.py b/tests/test_caching.py index 20362da0..8f3730e9 100644 --- a/tests/test_caching.py +++ b/tests/test_caching.py @@ -177,6 +177,8 @@ def test_persistent_mode(rig: CloudProviderTestRig, tmpdir): def test_interaction_with_local_cache_dir(rig: CloudProviderTestRig, tmpdir): + default_sleep = 0.5 # sometimes GH runners are slow and fail saying dir doesn't exist + # cannot instantiate persistent without local file dir with pytest.raises(InvalidConfigurationException): client = rig.client_class( @@ -198,7 +200,7 @@ def test_interaction_with_local_cache_dir(rig: CloudProviderTestRig, tmpdir): # download from cloud into the cache # must use open for close_file mode - sleep(0.1) # test can be flaky saying that the cache dir doesn't exist yet + sleep(default_sleep) with cp.open("r") as f: _ = f.read() @@ -214,7 +216,7 @@ def test_interaction_with_local_cache_dir(rig: CloudProviderTestRig, tmpdir): assert cp.client.file_cache_mode == FileCacheMode.cloudpath_object # download from cloud into the cache - sleep(0.1) # test can be flaky saying that the cache dir doesn't exist yet + sleep(default_sleep) # test can be flaky saying that the cache dir doesn't exist yet with cp.open("r") as f: _ = f.read() @@ -233,7 +235,7 @@ def test_interaction_with_local_cache_dir(rig: CloudProviderTestRig, tmpdir): assert cp.client.file_cache_mode == FileCacheMode.tmp_dir # download from cloud into the cache - sleep(0.1) # test can be flaky saying that the cache dir doesn't exist yet + sleep(default_sleep) # test can be flaky saying that the cache dir doesn't exist yet with cp.open("r") as f: _ = f.read()