Skip to content

Commit

Permalink
Add timeouts back using @pytest.mark.timeout()
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Nov 9, 2024
1 parent ba490a7 commit b60cfb0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion binderhub/tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

# We have optimized this slow test, for more information, see the README of
# https://github.com/binderhub-ci-repos/minimal-dockerfile.
@pytest.mark.timeout(900)
@pytest.mark.asyncio
@pytest.mark.parametrize(
"slug",
Expand Down Expand Up @@ -102,6 +103,7 @@ async def test_build(app, needs_build, needs_launch, always_build, slug, pytestc
stop.raise_for_status()


@pytest.mark.timeout(900)
@pytest.mark.asyncio
@pytest.mark.parametrize(
"app,build_only_query_param",
Expand Down Expand Up @@ -152,6 +154,7 @@ async def test_build_only(app, build_only_query_param, needs_build):
assert final["phase"] == "ready"


@pytest.mark.timeout(120)
@pytest.mark.asyncio
@pytest.mark.remote
async def test_build_fail(app, needs_build, needs_launch, always_build):
Expand All @@ -176,6 +179,7 @@ async def test_build_fail(app, needs_build, needs_launch, always_build):
assert failed_events > 0, "Should have seen phase 'failed'"


@pytest.mark.timeout(120)
@pytest.mark.asyncio
@pytest.mark.parametrize(
"app,build_only_query_param,expected_error_msg",
Expand Down Expand Up @@ -484,7 +488,7 @@ async def test_local_repo2docker_build():
docker_client = docker.from_env(version="auto")
assert docker_client.images.get(name)


@pytest.mark.timeout(20)
@pytest.mark.asyncio
async def test_local_repo2docker_build_stop(io_loop):
q = Queue()
Expand Down

0 comments on commit b60cfb0

Please sign in to comment.