Skip to content

Commit

Permalink
sleepier
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbull committed Oct 9, 2023
1 parent 2064b06 commit 7a85710
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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()

Expand All @@ -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()

Expand All @@ -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()

Expand Down

0 comments on commit 7a85710

Please sign in to comment.