mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-16 06:22:56 +00:00
Reduce sleep timeouts in tests
This commit is contained in:
@@ -46,7 +46,7 @@ def test_unsigned_ssl(
|
|||||||
# properly while the server is booting up. An SSL handshake error seems to
|
# properly while the server is booting up. An SSL handshake error seems to
|
||||||
# abort the retry logic. Forcing a long sleep for the moment until I have
|
# abort the retry logic. Forcing a long sleep for the moment until I have
|
||||||
# time to dig more.
|
# time to dig more.
|
||||||
time.sleep(5)
|
time.sleep(1)
|
||||||
resp = http_client.get(f"https://localhost:{host_port}", verify=False)
|
resp = http_client.get(f"https://localhost:{host_port}", verify=False)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
assert "login_submit" in resp.text
|
assert "login_submit" in resp.text
|
||||||
@@ -91,9 +91,9 @@ def test_nb_user_change(container: TrackedContainer) -> None:
|
|||||||
command=["start.sh", "bash", "-c", "sleep infinity"],
|
command=["start.sh", "bash", "-c", "sleep infinity"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Give the chown time to complete. Use sleep, not wait, because the
|
# Give the chown time to complete.
|
||||||
# container sleeps forever.
|
# Use sleep, not wait, because the container sleeps forever.
|
||||||
time.sleep(10)
|
time.sleep(1)
|
||||||
LOGGER.info(f"Checking if the user is changed to {nb_user} by the start script ...")
|
LOGGER.info(f"Checking if the user is changed to {nb_user} by the start script ...")
|
||||||
output = running_container.logs().decode("utf-8")
|
output = running_container.logs().decode("utf-8")
|
||||||
assert "ERROR" not in output
|
assert "ERROR" not in output
|
||||||
|
@@ -50,7 +50,7 @@ def test_start_notebook(
|
|||||||
ports={"8888/tcp": host_port},
|
ports={"8888/tcp": host_port},
|
||||||
)
|
)
|
||||||
# sleeping some time to let the server start
|
# sleeping some time to let the server start
|
||||||
time.sleep(3)
|
time.sleep(1)
|
||||||
logs = running_container.logs().decode("utf-8")
|
logs = running_container.logs().decode("utf-8")
|
||||||
LOGGER.debug(logs)
|
LOGGER.debug(logs)
|
||||||
# checking that the expected command is launched
|
# checking that the expected command is launched
|
||||||
|
Reference in New Issue
Block a user