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

pytest timeout is not respected when test is executing long-running SQL query #10323

Open
alexanderlaw opened this issue Jan 9, 2025 · 0 comments
Assignees
Labels
a/test Area: related to testing t/bug Issue Type: Bug

Comments

@alexanderlaw
Copy link
Contributor

This issue is a spin-off of #3760.

A test as simple as:

    env = neon_env_builder.init_start()
    endpoint = env.endpoints.create_start("main")

    conn = endpoint.connect()
    cur = conn.cursor()
    cur.execute("SET statement_timeout='600s'; SELECT pg_sleep(400);")

doesn't get interrupted timely, with the default pytest timeout (300):

...
2025-01-09 14:18:22.756 INFO [neon_fixtures.py:4167] neon.file_cache_size_limit = 1MB
------------------------------------------------------- Captured log teardown -------------------------------------------------------
2025-01-09 14:25:02.886 INFO [neon_fixtures.py:886] Cleaning up all storage and compute nodes
...
======================================================
FAILED test_runner/regress/test_timeout.py::test_timeout[debug-pg17] - Failed: Timeout >300.0s

A similar (worse) situation is possible when a backend just hangs and doesn't process interrupts for a long/indefinite time.

@alexanderlaw alexanderlaw added the t/bug Issue Type: Bug label Jan 9, 2025
@alexanderlaw alexanderlaw added the a/test Area: related to testing label Jan 9, 2025
@bayandin bayandin self-assigned this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/test Area: related to testing t/bug Issue Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants