Befunde der Abschlussprüfung behoben

This commit is contained in:
Rsclub2_2 committed 2026-11-15 03:02:45 +01:00
1 parent 7bd3498501
commit 95a23c0e45
23 files changed
+651 -44

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
"""Settings of the agent image that the service relies on. Runs where the Dockerfile is (not inside the image)."""
import json
import pathlib
import re
import pytest
DOCKERFILE = pathlib.Path(__file__).resolve().parents[1] / "Dockerfile"
@pytest.mark.skipif(not DOCKERFILE.exists(), reason="the image does not contain its Dockerfile")
def test_gunicorn_keeps_a_thread_for_health_while_a_case_runs():
cmd = json.loads(re.search(r"^CMD (\[.*\])$", DOCKERFILE.read_text(), re.MULTILINE).group(1))
assert cmd[cmd.index("--workers") + 1] == "1" # LOCK in server.py serialises cases within one process
assert int(cmd[cmd.index("--threads") + 1]) >= 2 # a second thread answers /health during a case