Skip to content

Commit af71cf4

Browse files
phernandezclaude
andcommitted
fix(test): clear search_vector_chunks before embedding backfill test
Test was polluted by other tests leaving rows in search_vector_chunks, causing _needs_semantic_embedding_backfill to return False. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
1 parent e846ae8 commit af71cf4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/services/test_initialization.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ async def test_needs_semantic_embedding_backfill_true_when_entities_exist_no_emb
393393
}
394394
)
395395

396+
# Clear any embeddings left by other tests in the shared DB
397+
async with db.scoped_session(session_maker) as session:
398+
await session.execute(db.text("DELETE FROM search_vector_chunks"))
399+
396400
app_config.semantic_search_enabled = True
397401
result = await db._needs_semantic_embedding_backfill(app_config, session_maker) # pyright: ignore [reportPrivateUsage]
398402
assert result is True

0 commit comments

Comments
 (0)