diff --git a/docker/tests/conftest.py b/docker/tests/conftest.py --- a/docker/tests/conftest.py +++ b/docker/tests/conftest.py @@ -43,6 +43,9 @@ subprocess.check_call(['docker-compose', 'down']) +_wfi_timeout = 60 + + @pytest.fixture def scheduler_host(request, docker_compose): # run a container in which test commands are executed @@ -50,8 +53,10 @@ ['docker-compose', 'run', '-d', 'swh-scheduler', 'shell', 'sleep', '1h']).decode().strip() scheduler_host = testinfra.get_host("docker://" + docker_id) - scheduler_host.check_output('wait-for-it swh-scheduler:5008 -t 30') - scheduler_host.check_output('wait-for-it swh-storage:5002 -t 30') + scheduler_host.check_output( + f'wait-for-it swh-scheduler:5008 -t {_wfi_timeout}') + scheduler_host.check_output( + f'wait-for-it swh-storage:5002 -t {_wfi_timeout}') # return a testinfra connection to the container yield scheduler_host @@ -74,7 +79,8 @@ 'tar -C /tmp -czf /tmp/archive.tgz /tmp/hello.py') deposit_host.check_output( f'echo \'{SAMPLE_METADATA}\' > /tmp/metadata.xml') - deposit_host.check_output('wait-for-it swh-deposit:5006 -t 30') + deposit_host.check_output( + f'wait-for-it swh-deposit:5006 -t {_wfi_timeout}') # return a testinfra connection to the container yield deposit_host