Skip to content

Commit 5c0b44f

Browse files
committed
Added shutdown of the container after each test, to see if that fixes
the CI
1 parent 3efe1d1 commit 5c0b44f

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

tests/test_helpers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ def _start_docker_container(backend, mounted_dir, working_dir, bin_dir, command=
9797

9898
return container
9999

100+
def _shutdown_docker_container(container):
101+
container.stop()
102+
container.remove()
103+
100104
def _get_total_size_of_directory(directory_path: str):
101105
total_size = 0
102106
for dirpath, dirnames, filenames in os.walk(directory_path):

tests/translators_loggers/test_translators_loggers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from tests.test_helpers import _create_fresh_local_dir
2020
from tests.test_helpers import _remove_local_dir_if_it_exists
2121
from tests.test_helpers import _start_docker_container
22+
from tests.test_helpers import _shutdown_docker_container
2223
from tests.test_helpers import _compare_workflows
2324

2425
from wfcommons import BlastRecipe
@@ -235,7 +236,7 @@ class TestTranslators:
235236
@pytest.mark.parametrize(
236237
"backend",
237238
[
238-
#"swiftt",
239+
"swiftt",
239240
"dask",
240241
"parsl",
241242
"nextflow",
@@ -251,7 +252,6 @@ def test_translator(self, backend) -> None:
251252
# Create workflow benchmark
252253
benchmark, num_tasks = _create_workflow_benchmark()
253254

254-
255255
# Create a local translation directory
256256
str_dirpath = "/tmp/" + backend + "_translated_workflow/"
257257
dirpath = pathlib.Path(str_dirpath)
@@ -293,3 +293,6 @@ def test_translator(self, backend) -> None:
293293

294294
_compare_workflows(original_workflow, reconstructed_workflow)
295295

296+
# Shutdown the container
297+
_shutdown_docker_container(container)
298+

0 commit comments

Comments
 (0)