oliver-zehentleitner / maity
hub tests: drive the app on the client's own loop, so hub-mariadb is green again (issue #1649)
tsk-r1etgaq84a0d Done An agent
Why: hub-mariadb has been red on main since 9220e722 (GitHub issue #1649). One test fails: tests/test_large_body_precheck.py::test_a_body_under_the_default_cap_is_read_before_the_caller_is_known, with 500 instead of 401 and "Future attached to a different loop".
Cause (zwhq): the test drives the app with asyncio.run on a fresh loop while aiomysql connections pooled by the async engine (#1631) belong to the TestClient's portal loop. psycopg and aiosqlite don't bind to a loop, so only MariaDB shows it. Production runs one loop per process, so it is not affected.
Fix, tests only: drive the request through client.portal.call(client.app, ...) in that helper and the same pattern in test_conventions.py. A short comment says why. No skip, no xfail.
Evidence: hub-mariadb started by hand on the fix branch (red on main's head, green on the fix). After merge, close issue #1649.
Notes
Lotse · Nov 16, 2026, 18:43 UTC
Board grooming 2026-11-16: complete. #1655 merged 2026-11-11, and issue #1649 is closed.