From 8b57d6a5b28b6fab6aa46808c40f7943b74aa8cf Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Tue, 7 Jan 2025 14:30:05 -0600 Subject: [PATCH] squash: use compatible? predicate --- .../instrumentation/rdkafka/instrumentation_test.rb | 1 + .../instrumentation/rdkafka/patches/consumer_test.rb | 6 +++--- .../instrumentation/rdkafka/patches/producer_test.rb | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/instrumentation_test.rb b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/instrumentation_test.rb index 9344b459d..d46a6ccdb 100644 --- a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/instrumentation_test.rb +++ b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/instrumentation_test.rb @@ -22,6 +22,7 @@ describe '#install' do it 'accepts argument' do + skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.compatible? _(instrumentation.install({})).must_equal(true) instrumentation.instance_variable_set(:@installed, false) end diff --git a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/consumer_test.rb b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/consumer_test.rb index ac368a881..d2472bc81 100644 --- a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/consumer_test.rb +++ b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/consumer_test.rb @@ -33,7 +33,7 @@ describe '#each' do it 'traces each call' do - skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.installed? + skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.compatible? rand_hash = SecureRandom.hex(10) topic_name = "consumer-patch-trace-#{rand_hash}" @@ -114,7 +114,7 @@ end it 'encodes messages keys depending on input format' do - skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.installed? + skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.compatible? rand_hash = SecureRandom.hex(10) topic_name = "consumer-patch-trace-#{rand_hash}" @@ -168,7 +168,7 @@ describe '#each_batch' do it 'traces each_batch call' do - skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.installed? + skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.compatible? rand_hash = SecureRandom.hex(10) topic_name = "consumer-patch-batch-trace-#{rand_hash}" diff --git a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/producer_test.rb b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/producer_test.rb index fa9355c40..1ee85f90f 100644 --- a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/producer_test.rb +++ b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/producer_test.rb @@ -32,7 +32,7 @@ describe 'tracing' do it 'traces sync produce calls' do - skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.installed? + skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.compatible? topic_name = 'producer-patch-trace' config = { 'bootstrap.servers': "#{host}:#{port}" }