Skip to content

Commit 5588cd0

Browse files
committed
Fix flaky Python zscan noScores test by filtering for results starting with value
Signed-off-by: Thomas Zhou <[email protected]>
1 parent cbe6d83 commit 5588cd0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

python/tests/async_tests/test_async_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10420,7 +10420,9 @@ def convert_list_to_dict(list: List) -> dict:
1042010420

1042110421
# Test no_scores option
1042210422
if not await check_if_server_version_lt(glide_client, "8.0.0"):
10423-
result = await glide_client.zscan(key1, initial_cursor, no_scores=True)
10423+
result = await glide_client.zscan(
10424+
key1, initial_cursor, match="value*", no_scores=True
10425+
)
1042410426
assert result[result_cursor_index] != b"0"
1042510427
values_array = cast(List[bytes], result[result_collection_index])
1042610428
# Verify that scores are not included

python/tests/sync_tests/test_sync_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10223,7 +10223,9 @@ def convert_list_to_dict(list: List) -> dict:
1022310223

1022410224
# Test no_scores option
1022510225
if not sync_check_if_server_version_lt(glide_sync_client, "8.0.0"):
10226-
result = glide_sync_client.zscan(key1, initial_cursor, no_scores=True)
10226+
result = glide_sync_client.zscan(
10227+
key1, initial_cursor, match="value*", no_scores=True
10228+
)
1022710229
assert result[result_cursor_index] != b"0"
1022810230
values_array = cast(List[bytes], result[result_collection_index])
1022910231
# Verify that scores are not included

0 commit comments

Comments
 (0)