close connections

This commit is contained in:
Raghotham Murthy 2025-10-07 08:29:06 -07:00
parent 22077e7f32
commit fa100c77fd
7 changed files with 13 additions and 5 deletions

View file

@ -18,6 +18,7 @@ async def sqlite_kvstore(tmp_path):
kvstore = SqliteKVStoreImpl(kvstore_config)
await kvstore.initialize()
yield kvstore
await kvstore.close()
@pytest.fixture(scope="function")

View file

@ -46,12 +46,9 @@ async def test_initialize_index(vector_index):
async def test_add_chunks_query_vector(vector_index, sample_chunks, sample_embeddings):
vector_index.delete()
vector_index.initialize()
await vector_index.add_chunks(sample_chunks, sample_embeddings)
resp = await vector_index.query_vector(sample_embeddings[0], k=1, score_threshold=-1)
assert resp.chunks[0].content == sample_chunks[0].content
vector_index.delete()
async def test_chunk_id_conflict(vector_index, sample_chunks, embedding_dimension):