Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
br3ndonland committed Jan 6, 2025
1 parent 319c07b commit 29e45e8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions inboard/gunicorn_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def run(self) -> None:

async def callback_notify(self) -> None:
self.notify()
self.log.info("callback_notify ran")


class UvicornH11Worker(UvicornWorker):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ show_error_codes = true
strict = true

[tool.pytest.ini_options]
addopts = "-q"
addopts = "-vv"
markers = [
"subprocess: test requires a subprocess (deselect with '-m \"not subprocess\"')",
]
Expand Down
9 changes: 9 additions & 0 deletions tests/test_gunicorn_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ def gunicorn_process(
bind,
"--graceful-timeout",
"1",
"--timeout",
"6",
"--log-level",
"debug",
"--worker-class",
Expand Down Expand Up @@ -324,3 +326,10 @@ def test_uvicorn_worker_boot_error(
except AssertionError: # pragma: no cover
time.sleep(5)
assert process_has_terminated(process, expected_text=expected_text)


def test_uvicorn_worker_timeout(gunicorn_process: Process) -> None:
# WIP
time.sleep(10)
output_text = gunicorn_process.read_output()
assert "WORKER TIMEOUT" in output_text

0 comments on commit 29e45e8

Please sign in to comment.