7532e20d1e
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
12 lines
359 B
Python
12 lines
359 B
Python
from lyra_worker.db import wait_for_db
|
|
|
|
|
|
def test_wait_for_db_returns_usable_connection_when_schema_ready(conn):
|
|
# `conn` fixture guarantees the DB is up and the schema is migrated.
|
|
result = wait_for_db(timeout=5)
|
|
try:
|
|
with result.cursor() as cur:
|
|
cur.execute('SELECT 1 FROM "Job" LIMIT 0')
|
|
finally:
|
|
result.close()
|