Skip to content

Commit 9b3c3b1

Browse files
authored
Merge pull request #1750 from mathbunnyru/asalikhov/reduce_timeouts
Reduce sleep timeouts in tests
2 parents 20dcf41 + 6e62efb commit 9b3c3b1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/base-notebook/test_container_options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_unsigned_ssl(
4646
# properly while the server is booting up. An SSL handshake error seems to
4747
# abort the retry logic. Forcing a long sleep for the moment until I have
4848
# time to dig more.
49-
time.sleep(5)
49+
time.sleep(1)
5050
resp = http_client.get(f"https://localhost:{host_port}", verify=False)
5151
resp.raise_for_status()
5252
assert "login_submit" in resp.text
@@ -91,9 +91,9 @@ def test_nb_user_change(container: TrackedContainer) -> None:
9191
command=["start.sh", "bash", "-c", "sleep infinity"],
9292
)
9393

94-
# Give the chown time to complete. Use sleep, not wait, because the
95-
# container sleeps forever.
96-
time.sleep(10)
94+
# Give the chown time to complete.
95+
# Use sleep, not wait, because the container sleeps forever.
96+
time.sleep(1)
9797
LOGGER.info(f"Checking if the user is changed to {nb_user} by the start script ...")
9898
output = running_container.logs().decode("utf-8")
9999
assert "ERROR" not in output

tests/base-notebook/test_start_container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_start_notebook(
5050
ports={"8888/tcp": host_port},
5151
)
5252
# sleeping some time to let the server start
53-
time.sleep(3)
53+
time.sleep(1)
5454
logs = running_container.logs().decode("utf-8")
5555
LOGGER.debug(logs)
5656
# checking that the expected command is launched

0 commit comments

Comments
 (0)