fix: mini fixes

This commit is contained in:
Alex committed 2026-08-26 16:37:03 +01:00
1 parent 8380f9bb47
commit dd3876fdcb
5 files changed
+327 -6

No files matched your search

@@ -44,11 +44,15 @@ def _dsn(info) -> str:
@pytest.fixture(autouse=True)
def _close_pools():
"""Never leak a pool into another test; the DSN dies with the test DB."""
yield
for dsn, pool in list(pgvector_module._POOLS.items()):
try:
pool.close()
except Exception:
# Teardown only: the ephemeral cluster may already be gone, and a
# failure to close a pool for a dead DSN must not fail the test
# that just passed. Dropping the entry below is what matters.
pass
pgvector_module._POOLS.pop(dsn, None)