Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace @pytest.mark.asyncio(timeout=TIMEOUT) #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions binderhub/tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

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


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


@pytest.mark.asyncio(timeout=120)
@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,7 +179,8 @@ async def test_build_fail(app, needs_build, needs_launch, always_build):
assert failed_events > 0, "Should have seen phase 'failed'"


@pytest.mark.asyncio(timeout=120)
@pytest.mark.timeout(120)
@pytest.mark.asyncio
@pytest.mark.parametrize(
"app,build_only_query_param,expected_error_msg",
[
Expand Down Expand Up @@ -485,7 +489,8 @@ async def test_local_repo2docker_build():
assert docker_client.images.get(name)


@pytest.mark.asyncio(timeout=20)
@pytest.mark.timeout(20)
@pytest.mark.asyncio
async def test_local_repo2docker_build_stop(io_loop):
q = Queue()
# We need a slow build here so that we can interrupt it, so pick a large repo that
Expand Down
Loading