Abmelde-Agent: Fälle, Zeitlauf und Agent-Dienst (Vikunja 97) (#3)
This commit was merged in pull request #3.
This commit is contained in:
36 files changed
+4385
-8
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user