summaryrefslogtreecommitdiff
path: root/tests/test_search.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_search.py')
-rw-r--r--tests/test_search.py21
1 files changed, 4 insertions, 17 deletions
diff --git a/tests/test_search.py b/tests/test_search.py
index 4175c53..e07a61c 100644
--- a/tests/test_search.py
+++ b/tests/test_search.py
@@ -646,25 +646,15 @@ def test_alias():
index1.hset("index1:lonestar", mapping={"name": "lonestar"})
index2.hset("index2:yogurt", mapping={"name": "yogurt"})
- if os.environ.get("GITHUB_WORKFLOW", None) is not None:
- time.sleep(2)
- else:
- time.sleep(5)
-
- def1 = IndexDefinition(prefix=["index1:"], score_field="name")
- def2 = IndexDefinition(prefix=["index2:"], score_field="name")
+ def1 = IndexDefinition(prefix=["index1:"])
+ def2 = IndexDefinition(prefix=["index2:"])
ftindex1 = index1.ft("testAlias")
- ftindex2 = index1.ft("testAlias2")
+ ftindex2 = index2.ft("testAlias2")
ftindex1.create_index((TextField("name"),), definition=def1)
ftindex2.create_index((TextField("name"),), definition=def2)
- # CI is slower
- try:
- res = ftindex1.search("*").docs[0]
- except IndexError:
- time.sleep(5)
- res = ftindex1.search("*").docs[0]
+ res = ftindex1.search("*").docs[0]
assert "index1:lonestar" == res.id
# create alias and check for results
@@ -681,9 +671,6 @@ def test_alias():
ftindex2.aliasupdate("spaceballs")
alias_client2 = getClient().ft("spaceballs")
- if os.environ.get("GITHUB_WORKFLOW", None) is not None:
- time.sleep(5)
-
res = alias_client2.search("*").docs[0]
assert "index2:yogurt" == res.id