From bc347b98ec854f5f52dcd23fe77d6ec820a99dc8 Mon Sep 17 00:00:00 2001 From: Amna Mubashar Date: Fri, 25 Oct 2024 12:38:34 +0200 Subject: [PATCH] Fix the conftest --- integrations/azure_ai_search/tests/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/azure_ai_search/tests/conftest.py b/integrations/azure_ai_search/tests/conftest.py index 1a187a79f..2101ced3b 100644 --- a/integrations/azure_ai_search/tests/conftest.py +++ b/integrations/azure_ai_search/tests/conftest.py @@ -10,7 +10,7 @@ from haystack_integrations.document_stores.azure_ai_search import AzureAISearchDocumentStore # This is the approximate time in seconds it takes for the documents to be available in Azure Search index -SLEEP_TIME_IN_SECONDS = 10 +SLEEP_TIME_IN_SECONDS = 5 @pytest.fixture() @@ -46,7 +46,7 @@ def document_store(request): # Override some methods to wait for the documents to be available original_write_documents = store.write_documents - def write_documents_and_wait(documents, policy=DuplicatePolicy.NONE): + def write_documents_and_wait(documents, policy=DuplicatePolicy.OVERWRITE): written_docs = original_write_documents(documents, policy) time.sleep(SLEEP_TIME_IN_SECONDS) return written_docs