@@ -646,25 +646,15 @@ def test_alias():
646
646
index1 .hset ("index1:lonestar" , mapping = {"name" : "lonestar" })
647
647
index2 .hset ("index2:yogurt" , mapping = {"name" : "yogurt" })
648
648
649
- if os .environ .get ("GITHUB_WORKFLOW" , None ) is not None :
650
- time .sleep (2 )
651
- else :
652
- time .sleep (5 )
653
-
654
- def1 = IndexDefinition (prefix = ["index1:" ], score_field = "name" )
655
- def2 = IndexDefinition (prefix = ["index2:" ], score_field = "name" )
649
+ def1 = IndexDefinition (prefix = ["index1:" ])
650
+ def2 = IndexDefinition (prefix = ["index2:" ])
656
651
657
652
ftindex1 = index1 .ft ("testAlias" )
658
- ftindex2 = index1 .ft ("testAlias2" )
653
+ ftindex2 = index2 .ft ("testAlias2" )
659
654
ftindex1 .create_index ((TextField ("name" ),), definition = def1 )
660
655
ftindex2 .create_index ((TextField ("name" ),), definition = def2 )
661
656
662
- # CI is slower
663
- try :
664
- res = ftindex1 .search ("*" ).docs [0 ]
665
- except IndexError :
666
- time .sleep (5 )
667
- res = ftindex1 .search ("*" ).docs [0 ]
657
+ res = ftindex1 .search ("*" ).docs [0 ]
668
658
assert "index1:lonestar" == res .id
669
659
670
660
# create alias and check for results
@@ -681,9 +671,6 @@ def test_alias():
681
671
ftindex2 .aliasupdate ("spaceballs" )
682
672
alias_client2 = getClient ().ft ("spaceballs" )
683
673
684
- if os .environ .get ("GITHUB_WORKFLOW" , None ) is not None :
685
- time .sleep (5 )
686
-
687
674
res = alias_client2 .search ("*" ).docs [0 ]
688
675
assert "index2:yogurt" == res .id
689
676
0 commit comments