Skip to content

Commit

Permalink
Failing test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 22, 2024
1 parent 6a75f89 commit 470d4b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions cluster/test/async/redis/cluster_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,12 @@

expect(result).to be == value
end

it "can map every slot to a client" do
Async::Redis::ClusterClient::HASH_SLOTS.times do |slot|
client = cluster.client_for(slot)

expect(client).not.to be_nil?
end
end
end
4 changes: 2 additions & 2 deletions lib/async/redis/cluster_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ def crc16(bytes)
return sum
end

HASH_SLOTS = 16_384

public

HASH_SLOTS = 16_384

# Return Redis::Client for a given key.
# Modified from https://github.com/antirez/redis-rb-cluster/blob/master/cluster.rb#L104-L117
def slot_for(key)
Expand Down

0 comments on commit 470d4b6

Please sign in to comment.