1010from haystack_integrations .document_stores .pinecone import PineconeDocumentStore
1111
1212# This is the approximate time in seconds it takes for the documents to be available
13- SLEEP_TIME_IN_SECONDS = 25
13+ WRITE_SLEEP_TIME_IN_SECONDS = 25
14+ DELETE_SLEEP_TIME_IN_SECONDS = 30
1415
1516
1617@pytest .fixture ()
17- def sleep_time ():
18- return SLEEP_TIME_IN_SECONDS
18+ def delete_sleep_time ():
19+ return DELETE_SLEEP_TIME_IN_SECONDS
1920
2021
2122@pytest .fixture
@@ -40,14 +41,14 @@ def document_store(request):
4041
4142 def write_documents_and_wait (documents , policy = DuplicatePolicy .NONE ):
4243 written_docs = original_write_documents (documents , policy )
43- time .sleep (SLEEP_TIME_IN_SECONDS )
44+ time .sleep (WRITE_SLEEP_TIME_IN_SECONDS )
4445 return written_docs
4546
4647 original_delete_documents = store .delete_documents
4748
4849 def delete_documents_and_wait (filters ):
4950 original_delete_documents (filters )
50- time .sleep (SLEEP_TIME_IN_SECONDS )
51+ time .sleep (DELETE_SLEEP_TIME_IN_SECONDS )
5152
5253 store .write_documents = write_documents_and_wait
5354 store .delete_documents = delete_documents_and_wait
@@ -81,14 +82,14 @@ async def document_store_async(request):
8182
8283 async def write_documents_and_wait_async (documents , policy = DuplicatePolicy .NONE ):
8384 written_docs = await original_write_documents (documents , policy )
84- await asyncio .sleep (SLEEP_TIME_IN_SECONDS )
85+ await asyncio .sleep (WRITE_SLEEP_TIME_IN_SECONDS )
8586 return written_docs
8687
8788 original_delete_documents = store .delete_documents_async
8889
8990 async def delete_documents_and_wait_async (filters ):
9091 await original_delete_documents (filters )
91- await asyncio .sleep (SLEEP_TIME_IN_SECONDS )
92+ await asyncio .sleep (DELETE_SLEEP_TIME_IN_SECONDS )
9293
9394 store .write_documents_async = write_documents_and_wait_async
9495 store .delete_documents_async = delete_documents_and_wait_async
0 commit comments