Skip to content

Commit

Permalink
test: Fix warning about deprecated pipelining in redis tests
Browse files Browse the repository at this point in the history
Warning message was:
`Pipelining commands on a Redis instance is deprecated and will be removed in Redis 5.0.0.`

Signed-off-by: Ferenc Géczi <ferenc.geczi@ibm.com>
  • Loading branch information
Ferenc- committed Mar 22, 2024
1 parent 6150af3 commit 96204ac
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/instrumentation/redis_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def test_pipeline_call
clear_all!

Instana.tracer.start_or_continue_trace(:redis_test) do
@redis_client.pipelined do
@redis_client.set('hello', 'world')
@redis_client.set('other', 'world')
@redis_client.pipelined do |pipeline|
pipeline.set('hello', 'world')
pipeline.set('other', 'world')
end
end

Expand All @@ -63,9 +63,9 @@ def test_pipeline_call_with_error

Instana.tracer.start_or_continue_trace(:redis_test) do
begin
@redis_client.pipelined do
@redis_client.set('other', 'world')
@redis_client.call('invalid')
@redis_client.pipelined do |pipeline|
pipeline.set('other', 'world')
pipeline.call('invalid')
end
rescue; end
end
Expand All @@ -77,9 +77,9 @@ def test_multi_call
clear_all!

Instana.tracer.start_or_continue_trace(:redis_test) do
@redis_client.multi do
@redis_client.set('hello', 'world')
@redis_client.set('other', 'world')
@redis_client.multi do |multi|
multi.set('hello', 'world')
multi.set('other', 'world')
end
end

Expand All @@ -91,9 +91,9 @@ def test_multi_call_with_error

Instana.tracer.start_or_continue_trace(:redis_test) do
begin
@redis_client.multi do
@redis_client.set('other', 'world')
@redis_client.call('invalid')
@redis_client.multi do |multi|
multi.set('other', 'world')
multi.call('invalid')
end
rescue; end
end
Expand Down

0 comments on commit 96204ac

Please sign in to comment.