From f82e3235f06f97fe45183b8b00ab3368b2e8e371 Mon Sep 17 00:00:00 2001 From: Abdul Basit Anees Date: Thu, 28 Aug 2025 16:47:51 +0000 Subject: [PATCH] Add time delay before searching indexes in tests --- tests/functional/model/run_model_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/model/run_model_test.py b/tests/functional/model/run_model_test.py index 3e13dec2..6574732c 100644 --- a/tests/functional/model/run_model_test.py +++ b/tests/functional/model/run_model_test.py @@ -94,6 +94,7 @@ def run_index_model(index_model, retries): except Exception: time.sleep(180) + time.sleep(2) response = index_model.search("Berlin") assert str(response.status) == "SUCCESS" assert "germany" in response.data.lower() @@ -172,6 +173,7 @@ def test_index_model_with_filter(embedding_model, supplier_params): except Exception: time.sleep(180) + time.sleep(2) assert index_model.count() == 2 response = index_model.search( "", filters=[IndexFilter(field="category", value="world", operator=IndexFilterOperator.EQUALS)] @@ -264,11 +266,13 @@ def test_index_model_air_with_image(): index_model.upsert(records) + time.sleep(2) response = index_model.search("beach") assert str(response.status) == "SUCCESS" second_record = response.details[1]["metadata"]["uri"] assert "hurricane" in second_record.lower() + time.sleep(2) response = index_model.search("people") assert str(response.status) == "SUCCESS" first_record = response.details[0]["data"] @@ -312,6 +316,7 @@ def test_index_model_air_with_splitter(embedding_model, supplier_params): ) response = index_model.count() assert response == 6 + time.sleep(2) response = index_model.search("berlin") assert str(response.status) == "SUCCESS" assert "berlin" in response.data.lower()