Forward-port lab3 SQLAlchemy and Alembic foundation
Carry source f591fa64e525679a31c9db7f942d36c789e1a12f forward from 72a1e57. Preserve lab4 attachment transactions, reconciliation locks, quarantine, and existing schema data through verified legacy adoption. Keep report and evidence work in progress untouched.
This commit is contained in:
@@ -211,6 +211,13 @@ async def test_postgres_stopped_gives_bounded_503_and_recovers(http: AsyncClient
|
||||
me = await http.get("/api/v1/users/me", headers=bearer(token))
|
||||
print(f"postgres запущен: готовность через {recovered:.1f} с, прежний токен {me.status_code}")
|
||||
assert me.json() == user
|
||||
instances = set()
|
||||
for _ in range(40):
|
||||
response = await http.post("/api/v1/users", json=new_user("recovered"))
|
||||
assert response.status_code == 201
|
||||
instances.add(response.headers["X-Instance-Id"])
|
||||
print(f"postgres запущен: 40 регистраций 201 через {len(instances)} реплики без рестарта API")
|
||||
assert len(instances) >= 2
|
||||
assert started_at("api") == api_started
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user