test(pipeline): isolate durable stream snapshot from concurrent relay

This commit is contained in:
2026-11-15 22:49:40 +03:00
parent a275cf2632
commit 2fa1b45da2
7 changed files with 215 additions and 5 deletions
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
set -eu
docker compose stop --timeout 1 worker
+3 -1
View File
@@ -310,12 +310,14 @@ def main():
f"with db.connection() as c: r=c.execute('SELECT count(*) n FROM outbox WHERE job_id=%s AND published_at IS NOT NULL',({j!r},)).fetchone()\nprint(json.dumps(r['n']>0))"
)
)
stop("relay")
ids = inside("print(json.dumps(queue.xrange(STREAM)))")
compose("kill", "-s", "SIGKILL", "broker")
start("broker")
wait(lambda: inside("print(json.dumps(queue.ping()))"))
restored = inside("print(json.dumps(queue.xrange(STREAM)))")
assert restored == ids
assert restored == ids, {"before": ids, "after": restored}
start("relay")
start("worker")
save(
"confirmed_broker_entry_survives_sigkill",