Skip to content

Commit ed1b560

Browse files
julian-rischclaude
andcommitted
fix: add sleep wrapper for delete_all_documents_async in Pinecone conftest
Pinecone's eventual consistency requires a delay after deletions before counts reflect the change. The conftest already wrapped delete_documents_async with a sleep, but missed delete_all_documents_async, causing a flaky test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7481785 commit ed1b560

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

integrations/pinecone/tests/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,15 @@ async def delete_documents_and_wait_async(filters):
9494
await original_delete_documents(filters)
9595
await asyncio.sleep(DELETE_SLEEP_TIME_IN_SECONDS)
9696

97+
original_delete_all_documents = store.delete_all_documents_async
98+
99+
async def delete_all_documents_and_wait_async():
100+
await original_delete_all_documents()
101+
await asyncio.sleep(DELETE_SLEEP_TIME_IN_SECONDS)
102+
97103
store.write_documents_async = write_documents_and_wait_async
98104
store.delete_documents_async = delete_documents_and_wait_async
105+
store.delete_all_documents_async = delete_all_documents_and_wait_async
99106

100107
yield store
101108
try:

0 commit comments

Comments
 (0)