Skip to content

Commit 0f81d78

Browse files
test(compatibility): simplify alias compatibility test queries
- Remove complex SORTBY clauses from alias search compatibility tests - Simplify aggregate query by removing sortby and limit operations - Update alias variable naming for clarity in aliasupdate_search test - Regenerate pickle files with updated test expectations - Reduce query complexity to focus on core alias functionality Signed-off-by: Riley Des <riley.desserre@improving.com>
1 parent 47cc3ab commit 0f81d78

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

69.2 KB
Binary file not shown.
22 Bytes
Binary file not shown.

integration/compatibility/generate.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,7 @@ def test_alias_search(self, key_type, dialect):
474474
idx = f"{key_type}_idx1"
475475
alias = f"{key_type}_alias_compat"
476476
self.execute_command(["FT.ALIASADD", alias, idx])
477-
self.execute_command(["ft.search", alias, "@n1:[-inf inf]", "SORTBY", "n1", "ASC", "DIALECT", str(dialect)])
478-
self.check(dialect, "ft.search", alias, "*", "SORTBY", "n2", "DESC", "LIMIT", "0", "5")
477+
self.check(dialect, "ft.search", alias, "*", "LIMIT", "0", "15")
479478
self.execute_command(["FT.ALIASDEL", alias])
480479

481480
def test_alias_aggregate(self, key_type, dialect):
@@ -485,18 +484,17 @@ def test_alias_aggregate(self, key_type, dialect):
485484
alias = f"{key_type}_alias_compat"
486485
# Record alias management commands so replay recreates the same state.
487486
self.execute_command(["FT.ALIASADD", alias, idx])
488-
self.check(dialect, f"ft.aggregate {alias} * load 3 @__key @n1 @n2 sortby 2 @__key desc limit 0 5")
487+
self.check(dialect, f"ft.aggregate {alias} * load 3 @__key @n1 @n2")
489488
self.execute_command(["FT.ALIASDEL", alias])
490489

491490
def test_aliasupdate_search(self, key_type, dialect):
492491
"""FT.ALIASUPDATE reassigns alias; queries via alias reflect the new target."""
493492
self.setup_data("sortable numbers", key_type)
494493
idx = f"{key_type}_idx1"
495-
alias = f"{key_type}_alias_compat"
496-
# Record alias management commands so replay recreates the same state.
494+
alias = f"{key_type}_alias_update_compat"
497495
self.execute_command(["FT.ALIASADD", alias, idx])
498496
self.execute_command(["FT.ALIASUPDATE", alias, idx])
499-
self.execute_command(["ft.search", alias, "@n1:[-inf inf]", "SORTBY", "n1", "ASC", "DIALECT", str(dialect)])
497+
self.check(dialect, "ft.search", alias, "*", "LIMIT", "0", "15")
500498
self.execute_command(["FT.ALIASDEL", alias])
501499

502500

0 commit comments

Comments
 (0)