Avoid hanging artifact cache tests
Description
We use multiprocessing to run artifact cache push/pull tests. If something breaks inside BuildStream while doing that, the exception is discarded and the test waits forever for queue.get to complete.
Changes proposed in this merge request:
- Add a wrapper to functions in
pull.pywhich will add an entry to the queue if an exception occurs - Catch exceptions in
ArtifactShare.runwhich adds an entry to the queue.
Note that in some cases the thing placed on the queue will cause an error if the code expects a tuple. This can already happen in the existing code (see _test_push_tree) and is still better than a hang.
Edited by Jim MacArthur