# Failed: Timeout (>60.0s) from pytest-timeout.

- **ID:** `python/pytest-timeout-exceeded-hanging-test`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A test or fixture blocked longer than the configured timeout — often due to a network call without timeout, an unclosed DB connection, or a deadlock in a threaded fixture.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 2.2.x | active | — | — |
| 2.3.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   import httpx
r = httpx.get(url, timeout=5.0)

# or requests
requests.get(url, timeout=(3.05, 5))
   ```
2. **** (85% success)
   ```
   # pytest.ini
[pytest]
timeout = 30
timeout_method = signal

# per test
@pytest.mark.timeout(10)
def test_fast(): ...
   ```

## Dead Ends

- **** — Masks the hang; CI still stalls and the underlying deadlock remains, eventually failing at a higher timeout. (75% fail)
- **** — Thread method can't interrupt blocking C calls (e.g., socket recv); the test still hangs and gets killed at signal level. (55% fail)
