We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a75f89 commit ae16175Copy full SHA for ae16175
cluster/test/async/redis/cluster_client.rb
@@ -43,4 +43,12 @@
43
44
expect(result).to be == value
45
end
46
+
47
+ it "can map every slot to a client" do
48
+ Async::Redis::ClusterClient::HASH_SLOTS.times do |slot|
49
+ client = cluster.client_for(slot)
50
51
+ expect(client).not.to be_nil
52
+ end
53
54
lib/async/redis/cluster_client.rb
@@ -179,10 +179,10 @@ def crc16(bytes)
179
return sum
180
181
182
- HASH_SLOTS = 16_384
183
-
184
public
185
+ HASH_SLOTS = 16_384
186
# Return Redis::Client for a given key.
187
# Modified from https://github.com/antirez/redis-rb-cluster/blob/master/cluster.rb#L104-L117
188
def slot_for(key)
0 commit comments