Forward the lab 4 foundation and migrate the lab 5 pipeline to SQLAlchemy

This commit is contained in:
Artyom
2026-11-06 09:12:25 +03:00
parent ae9f60fe1f
commit 1217da5f5e
134 changed files with 8243 additions and 1409 deletions
+4 -3
View File
@@ -46,15 +46,16 @@ def test_timeouts_shrink_inwards_and_shutdown_fits_the_stop_budget() -> None:
database = api["DB_ACQUIRE_TIMEOUT_SECONDS"] + api["DB_COMMAND_TIMEOUT_SECONDS"]
drain, shutdown = api["DRAIN_SECONDS"], api["SHUTDOWN_TIMEOUT_SECONDS"]
print(
f"обнаружение {detection} с (зависание {hung} с), окно {drain} с, остановка {shutdown} с,"
f" хук {hook} с, stop_grace_period {grace} с; LB server {lb['timeout server']} с >"
f"обнаружение {detection} с (зависание {hung} с), окно {drain} с,"
f" дообработка {shutdown - drain - 1} с, остановка {shutdown} с, хук {hook} с,"
f" stop_grace_period {grace} с; LB server {lb['timeout server']} с >"
f" запрос {api['REQUEST_TIMEOUT_SECONDS']} с > БД {database} с;"
f" readiness {2 * PING_TIMEOUT_SECONDS} с < check {lb['timeout check']} с"
)
assert lb["timeout server"] > api["REQUEST_TIMEOUT_SECONDS"] > database
assert lb["timeout check"] > 2 * PING_TIMEOUT_SECONDS
assert drain > detection
assert shutdown - drain >= database
assert shutdown - drain - 1 >= database
assert shutdown < hook < grace < 10
assert lb["hard-stop-after"] < seconds(stand["lb"]["stop_grace_period"])
assert (detection, hung) == (1.5, 3.5)