-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix redis-clustering gem to pass the test with latest dependencies #1222
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,5 +47,5 @@ Gem::Specification.new do |s| | |
s.required_ruby_version = '>= 2.7.0' | ||
|
||
s.add_runtime_dependency('redis', s.version) | ||
s.add_runtime_dependency('redis-cluster-client', '>= 0.3.7') | ||
s.add_runtime_dependency('redis-cluster-client', '>= 0.6.1') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,6 @@ def test_migrate | |
def test_object | ||
redis.lpush('mylist', 'Hello World') | ||
assert_equal 1, redis.object('refcount', 'mylist') | ||
assert_equal 'quicklist', redis.object('encoding', 'mylist') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was changed to 'listpack' in Redis 7.2. We have no advantages for testing redis minor behavior, so just removed. |
||
assert(redis.object('idletime', 'mylist') >= 0) | ||
|
||
redis.set('foo', 1000) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,12 +41,8 @@ def test_client_kill | |
|
||
def test_client_list | ||
a_client_info = redis.client(:list).first | ||
actual = a_client_info.keys.sort | ||
expected = %w[addr age cmd db events fd flags id idle multi name obl oll omem psub qbuf qbuf-free sub] | ||
expected << 'user' << 'argv-mem' << 'tot-mem' if version >= '6' | ||
expected << 'laddr' << 'redir' if version >= '6.2' | ||
expected << "multi-mem" << "rbp" << "rbs" << "resp" << "ssub" if version >= '7.0' | ||
assert_equal expected.sort, actual.sort | ||
assert_instance_of Hash, a_client_info | ||
assert_includes a_client_info, 'addr' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
end | ||
|
||
def test_client_getname | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/redis-rb/redis-cluster-client/blob/9b5fc6644a9cffab169bca517552120519bad7e4/lib/redis_client/cluster/router.rb#L208-L210