forked from mtusi2026/mtusi2026lab5
тесты: ждать обновления счётчиков rabbitmqctl; collect_evidence и CI для lab5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
962adbe03b
commit
a3fa7713fa
@@ -34,6 +34,8 @@ def psql(sql: str) -> str:
|
||||
|
||||
|
||||
def queue_depth() -> str:
|
||||
"""messages/consumers of the jobs queue; rabbitmqctl refreshes these counters every ~5 s."""
|
||||
time.sleep(6)
|
||||
out = compose("exec", "-T", "broker", "rabbitmqctl", "-q", "list_queues", "name", "messages", "consumers")
|
||||
line = next(l for l in out.splitlines() if l.startswith("messenger.attachment-jobs\t"))
|
||||
_, messages, consumers = line.split("\t")
|
||||
@@ -69,7 +71,7 @@ def main() -> int:
|
||||
try:
|
||||
step("1. docker compose stop worker")
|
||||
compose("stop", "worker")
|
||||
print(" " + compose("ps", "--format", "{{.Service}} {{.State}}", "worker").strip())
|
||||
print(" " + compose("ps", "-a", "--format", "{{.Service}} {{.State}}", "worker").strip())
|
||||
|
||||
step("2. upload while the worker is stopped")
|
||||
st, h, b = c.call("POST", f"/api/v1/chats/{chat['id']}/attachments?filename=sample.png", token=alice["token"],
|
||||
|
||||
Reference in New Issue
Block a user