mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 18:15:02 +00:00
fix: mini fixes
This commit is contained in:
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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user