Skip to content

Commit 632b4b3

Browse files
authored
HOTFIX: Add time delay before searching indexes in tests (#646)
1 parent 69577aa commit 632b4b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/functional/model/run_model_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def run_index_model(index_model, retries):
9494
except Exception:
9595
time.sleep(180)
9696

97+
time.sleep(2)
9798
response = index_model.search("Berlin")
9899
assert str(response.status) == "SUCCESS"
99100
assert "germany" in response.data.lower()
@@ -172,6 +173,7 @@ def test_index_model_with_filter(embedding_model, supplier_params):
172173
except Exception:
173174
time.sleep(180)
174175

176+
time.sleep(2)
175177
assert index_model.count() == 2
176178
response = index_model.search(
177179
"", filters=[IndexFilter(field="category", value="world", operator=IndexFilterOperator.EQUALS)]
@@ -264,11 +266,13 @@ def test_index_model_air_with_image():
264266

265267
index_model.upsert(records)
266268

269+
time.sleep(2)
267270
response = index_model.search("beach")
268271
assert str(response.status) == "SUCCESS"
269272
second_record = response.details[1]["metadata"]["uri"]
270273
assert "hurricane" in second_record.lower()
271274

275+
time.sleep(2)
272276
response = index_model.search("people")
273277
assert str(response.status) == "SUCCESS"
274278
first_record = response.details[0]["data"]
@@ -312,6 +316,7 @@ def test_index_model_air_with_splitter(embedding_model, supplier_params):
312316
)
313317
response = index_model.count()
314318
assert response == 6
319+
time.sleep(2)
315320
response = index_model.search("berlin")
316321
assert str(response.status) == "SUCCESS"
317322
assert "berlin" in response.data.lower()

0 commit comments

Comments
 (0)