Skip to content
Snippets Groups Projects
Commit 80e912e6 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

tests/artifactcache/expiry.py: Fix test case expectations.

parent 70971f24
No related branches found
No related tags found
1 merge request!779Tristan/fix cache exclusivity 1.2
......@@ -175,6 +175,22 @@ def test_keep_dependencies(cli, datafiles, tmpdir):
# Assert that we never delete a dependency required for a build tree
#
# NOTE: This test expects that a build will fail if it attempts to
# put more artifacts in the cache than the quota can hold,
# and expects that the last two elements which don't fit into
# the quota wont even be built.
#
# In real life, this will not be the case, since once we reach
# the estimated quota we launch a cache size calculation job and
# only launch a cleanup job when the size is calculated; and
# other build tasks will be scheduled while the cache size job
# is running.
#
# This test only passes because we configure `builders` to 1,
# ensuring that the cache size job runs exclusively since it
# also requires a compute resource (a "builder").
#
@pytest.mark.datafiles(DATA_DIR)
def test_never_delete_dependencies(cli, datafiles, tmpdir):
project = os.path.join(datafiles.dirname, datafiles.basename)
......@@ -183,6 +199,9 @@ def test_never_delete_dependencies(cli, datafiles, tmpdir):
cli.configure({
'cache': {
'quota': 10000000
},
'scheduler': {
'builders': 1
}
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment