summaryrefslogtreecommitdiff
path: root/tests/sourcecache/fetch.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-10-08 17:09:00 +0200
committerJürg Billeter <j@bitron.ch>2020-12-14 10:42:59 +0100
commit6b4baf81ad123d68f21560a13cbecb546155314f (patch)
tree29edfbf2a2098f839bde92b7d946f7eaa2e7aa7d /tests/sourcecache/fetch.py
parent592c04e44fb73151f5273f7125aaf7e0b60b925d (diff)
downloadbuildstream-juerg/cache-query-job.tar.gz
Call _initialize_state() in Element._new_from_load_element()juerg/cache-query-job
With the cache queries moved to job threads, `_initialize_state()` is fairly lightweight and can be called earlier.
Diffstat (limited to 'tests/sourcecache/fetch.py')
-rw-r--r--tests/sourcecache/fetch.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/sourcecache/fetch.py b/tests/sourcecache/fetch.py
index 1f8911f84..d5aac0fe4 100644
--- a/tests/sourcecache/fetch.py
+++ b/tests/sourcecache/fetch.py
@@ -74,7 +74,6 @@ def test_source_fetch(cli, tmpdir, datafiles):
project.ensure_fully_loaded()
element = project.load_elements([element_name])[0]
- element._initialize_state()
element._fetch(check_only=True)
assert not element._cached_sources()
source = list(element.sources())[0]
@@ -115,7 +114,6 @@ def test_source_fetch(cli, tmpdir, datafiles):
project.ensure_fully_loaded()
element = project.load_elements([element_name])[0]
- element._initialize_state()
# check that we have the source in the cas now and it's not fetched
element._fetch(check_only=True)
@@ -136,7 +134,6 @@ def test_fetch_fallback(cli, tmpdir, datafiles):
project.ensure_fully_loaded()
element = project.load_elements([element_name])[0]
- element._initialize_state()
element._fetch(check_only=True)
assert not element._cached_sources()
source = list(element.sources())[0]
@@ -155,7 +152,6 @@ def test_fetch_fallback(cli, tmpdir, datafiles):
# Check that the source in both in the source dir and the local CAS
element = project.load_elements([element_name])[0]
- element._initialize_state()
element._fetch(check_only=True)
assert element._cached_sources()
@@ -172,7 +168,6 @@ def test_pull_fail(cli, tmpdir, datafiles):
project.ensure_fully_loaded()
element = project.load_elements([element_name])[0]
- element._initialize_state()
element._fetch(check_only=True)
assert not element._cached_sources()
source = list(element.sources())[0]
@@ -205,7 +200,6 @@ def test_source_pull_partial_fallback_fetch(cli, tmpdir, datafiles):
project.ensure_fully_loaded()
element = project.load_elements([element_name])[0]
- element._initialize_state()
element._fetch(check_only=True)
assert not element._cached_sources()
source = list(element.sources())[0]