summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-09-04 02:21:48 -0400
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-09-04 02:24:57 -0400
commit0b8a3a0d91e24cee8fe567be322a71142ca5e7e6 (patch)
treeb11ee42cdce242eab17e7e5d2257726540ef1600
parent9834da72329b6d2fc7d5db357a3c836e4710cab5 (diff)
downloadbuildstream-0b8a3a0d91e24cee8fe567be322a71142ca5e7e6.tar.gz
tests/artifactcache/basics.py: Call artifacts.pull() in a subprocess
This causes fetch operations to work later on in the frontend tests when we run the scheduler and use ostree in a sub proecess.
-rw-r--r--tests/artifactcache/basics.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/artifactcache/basics.py b/tests/artifactcache/basics.py
index 5db7450f2..97b57358a 100644
--- a/tests/artifactcache/basics.py
+++ b/tests/artifactcache/basics.py
@@ -97,5 +97,9 @@ def test_push_pull(pipeline, tmpdir):
# read summary file
pipeline.artifacts.fetch_remote_refs()
- pipeline.artifacts.pull(pipeline.target)
+ # Fetch artifact in subprocess to avoid hang in the next OSTree operation
+ p = multiprocessing.Process(target=pipeline.artifacts.pull, args=(pipeline.target,))
+ p.start()
+ p.join()
+
assert(pipeline.artifacts.contains(pipeline.target))