Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
supercaracal committed Sep 26, 2024
1 parent 41e9a20 commit a6ab0d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/redis_client/cluster/router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def scan(*command, seed: nil, **kwargs) # rubocop:disable Metrics/AbcSize

command[1] = raw_cursor.to_s

result_cursor, result_keys = handle_cluster_state_errors { client.call_v(command) }
result_cursor, result_keys = client.call_v(command)
result_cursor = Integer(result_cursor)

client_index += 1 if result_cursor == 0
Expand Down
15 changes: 6 additions & 9 deletions test/test_against_cluster_scale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,14 @@ def do_test_after_scaled_out

def do_test_after_scaled_in
all_keys = Array.new(NUMBER_OF_KEYS) { |i| ["key#{i}", "{group#{i / HASH_TAG_GRAIN}}:key#{i}"] }.flatten.sort
count = 0

retryable(attempts: 3) do
count = 0

@client.scan do |key|
count += 1
assert_includes(all_keys, key, 'Case: key')
end

assert_equal(all_keys.size, count, 'Case: count')
@client.scan do |key|
count += 1
assert_includes(all_keys, key, 'Case: key')
end

assert_equal(all_keys.size, count, 'Case: count')
end
end
end
Expand Down

0 comments on commit a6ab0d2

Please sign in to comment.