pre-commit-ci-lite[bot]
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
2 deletions
-
tests/test_depends_deadlock.py
|
|
|
@ -4,7 +4,6 @@ import threading |
|
|
|
import time |
|
|
|
from collections.abc import Iterator |
|
|
|
|
|
|
|
import pytest |
|
|
|
from fastapi import Depends, FastAPI |
|
|
|
from httpx import ASGITransport, AsyncClient |
|
|
|
from pydantic import BaseModel |
|
|
|
@ -54,7 +53,9 @@ def test_depends_deadlock() -> None: |
|
|
|
proc.join(timeout=10) |
|
|
|
|
|
|
|
try: |
|
|
|
assert not proc.is_alive(), "Process is still alive after timeout, likely due to a deadlock" |
|
|
|
assert not proc.is_alive(), ( |
|
|
|
"Process is still alive after timeout, likely due to a deadlock" |
|
|
|
) |
|
|
|
finally: |
|
|
|
proc.kill() # Ensure the process is terminated if it's still alive |
|
|
|
|
|
|
|
|