Skip to content

Commit

Permalink
Print logs when startup fails
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Jul 22, 2024
1 parent dba9fbb commit 1a0c3ae
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tests_integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,16 @@ def notebook_service(docker_ip, docker_services):
port = docker_services.port_for("aiidalab", 8888)
url = f"http://{docker_ip}:{port}"
token = os.environ.get("JUPYTER_TOKEN", "testtoken")
docker_services.wait_until_responsive(
# The timeout is very high for this test, because the installation of pseudo libraries.
timeout=180.0,
pause=0.1,
check=lambda: is_responsive(url),
)
try:
docker_services.wait_until_responsive(
# The timeout is very high for this test, because the installation of pseudo libraries.
timeout=180.0,
pause=0.1,
check=lambda: is_responsive(url),
)
except Exception as e:
print(docker_compose.execute("logs").decode().strip())
pytest.exit(e)
return url, token


Expand Down

0 comments on commit 1a0c3ae

Please sign in to comment.