Skip to content

Commit f4b31dd

Browse files
committed
Increase all run_and_wait timeouts to at least 10 seconds
1 parent 1473c9b commit f4b31dd

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

tests/by_image/datascience-notebook/test_julia_datascience.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55

66
def test_julia(container: TrackedContainer) -> None:
7-
container.run_and_wait(timeout=5, command=["julia", "--version"])
7+
container.run_and_wait(timeout=10, command=["julia", "--version"])

tests/by_image/docker-stacks-foundation/test_package_managers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ def test_package_manager(
1313
container: TrackedContainer, package_manager_command: str
1414
) -> None:
1515
"""Test that package managers are installed and run."""
16-
container.run_and_wait(timeout=5, command=[package_manager_command, "--version"])
16+
container.run_and_wait(timeout=10, command=[package_manager_command, "--version"])

tests/by_image/docker-stacks-foundation/test_python_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_python_version(container: TrackedContainer) -> None:
1313
f"Checking that python major.minor version is {EXPECTED_PYTHON_VERSION}"
1414
)
1515
logs = container.run_and_wait(
16-
timeout=5,
16+
timeout=10,
1717
command=["python", "--version"],
1818
)
1919
python = next(line for line in logs.splitlines() if line.startswith("Python "))
@@ -26,7 +26,7 @@ def test_python_version(container: TrackedContainer) -> None:
2626
def test_python_pinned_version(container: TrackedContainer) -> None:
2727
LOGGER.info(f"Checking that pinned python version is {EXPECTED_PYTHON_VERSION}.*")
2828
logs = container.run_and_wait(
29-
timeout=5,
29+
timeout=10,
3030
command=["cat", "/opt/conda/conda-meta/pinned"],
3131
)
3232
assert f"python {EXPECTED_PYTHON_VERSION}.*" in logs

tests/by_image/docker-stacks-foundation/test_run_hooks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
def test_run_hooks_zero_args(container: TrackedContainer) -> None:
1313
logs = container.run_and_wait(
14-
timeout=5,
14+
timeout=10,
1515
no_failure=False,
1616
command=["bash", "-c", "source /usr/local/bin/run-hooks.sh"],
1717
)
@@ -20,7 +20,7 @@ def test_run_hooks_zero_args(container: TrackedContainer) -> None:
2020

2121
def test_run_hooks_two_args(container: TrackedContainer) -> None:
2222
logs = container.run_and_wait(
23-
timeout=5,
23+
timeout=10,
2424
no_failure=False,
2525
command=[
2626
"bash",
@@ -33,7 +33,7 @@ def test_run_hooks_two_args(container: TrackedContainer) -> None:
3333

3434
def test_run_hooks_missing_dir(container: TrackedContainer) -> None:
3535
logs = container.run_and_wait(
36-
timeout=5,
36+
timeout=10,
3737
no_failure=False,
3838
command=[
3939
"bash",
@@ -46,7 +46,7 @@ def test_run_hooks_missing_dir(container: TrackedContainer) -> None:
4646

4747
def test_run_hooks_dir_is_file(container: TrackedContainer) -> None:
4848
logs = container.run_and_wait(
49-
timeout=5,
49+
timeout=10,
5050
no_failure=False,
5151
command=[
5252
"bash",
@@ -59,7 +59,7 @@ def test_run_hooks_dir_is_file(container: TrackedContainer) -> None:
5959

6060
def test_run_hooks_empty_dir(container: TrackedContainer) -> None:
6161
container.run_and_wait(
62-
timeout=5,
62+
timeout=10,
6363
command=[
6464
"bash",
6565
"-c",
@@ -85,7 +85,7 @@ def run_source_in_dir(
8585
"source /usr/local/bin/run-hooks.sh /home/jovyan/data-copy/" + command_suffix
8686
)
8787
return container.run_and_wait(
88-
timeout=5,
88+
timeout=10,
8989
volumes={host_data_dir: {"bind": cont_data_dir, "mode": "ro"}},
9090
no_failure=no_failure,
9191
command=["bash", "-c", command],

tests/by_image/docker-stacks-foundation/test_user_options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def test_group_add(container: TrackedContainer) -> None:
159159
additionally verify that setting gid=0 is suggested in a warning.
160160
"""
161161
logs = container.run_and_wait(
162-
timeout=5,
162+
timeout=10,
163163
no_warnings=False,
164164
user="1010:1010",
165165
group_add=["users"], # Ensures write access to /home/jovyan
@@ -180,7 +180,7 @@ def test_set_uid(container: TrackedContainer) -> None:
180180
# This test needs to have tty disabled, the reason is explained here:
181181
# https://github.com/jupyter/docker-stacks/pull/2260#discussion_r2008821257
182182
logs = container.run_and_wait(
183-
timeout=5, no_warnings=False, user="1010", command=["id"], tty=False
183+
timeout=10, no_warnings=False, user="1010", command=["id"], tty=False
184184
)
185185
assert "uid=1010(jovyan) gid=0(root)" in logs
186186
warnings = TrackedContainer.get_warnings(logs)
@@ -191,7 +191,7 @@ def test_set_uid(container: TrackedContainer) -> None:
191191
def test_set_uid_and_nb_user(container: TrackedContainer) -> None:
192192
"""Container should run with the specified uid and NB_USER."""
193193
logs = container.run_and_wait(
194-
timeout=5,
194+
timeout=10,
195195
no_warnings=False,
196196
user="1010",
197197
environment=["NB_USER=kitten"],
@@ -266,7 +266,7 @@ def test_secure_path(container: TrackedContainer, tmp_path: pathlib.Path) -> Non
266266
host_file.chmod(0o755)
267267

268268
logs = container.run_and_wait(
269-
timeout=5,
269+
timeout=10,
270270
user="root",
271271
volumes={host_file: {"bind": "/usr/bin/python", "mode": "ro"}},
272272
command=["python", "--version"],

tests/by_image/julia-notebook/test_julia.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55

66
def test_julia(container: TrackedContainer) -> None:
7-
container.run_and_wait(timeout=5, command=["julia", "--version"])
7+
container.run_and_wait(timeout=10, command=["julia", "--version"])

0 commit comments

Comments
 (0)