diff --git a/sentry-rails/spec/sentry/rails/tracing/active_support_subscriber_spec.rb b/sentry-rails/spec/sentry/rails/tracing/active_support_subscriber_spec.rb index 00e47410d..0c808203a 100644 --- a/sentry-rails/spec/sentry/rails/tracing/active_support_subscriber_spec.rb +++ b/sentry-rails/spec/sentry/rails/tracing/active_support_subscriber_spec.rb @@ -121,6 +121,8 @@ end it "tracks sets cache hit" do + skip("cache.hit is unset on Rails 6.0.x.") if Rails.version.to_i == 6 + Rails.cache.write("my_cache_key", "my_cache_value") transaction = Sentry::Transaction.new(sampled: true, hub: Sentry.get_current_hub) Sentry.get_current_scope.set_span(transaction) @@ -139,7 +141,7 @@ expect(cache_transaction[:spans][1][:op]).to eq("cache.get") expect(cache_transaction[:spans][1][:origin]).to eq("auto.cache.rails") - expect(cache_transaction[:spans][0][:data]['cache.key']).to eq(["my_cache_key_non_existing"]) + expect(cache_transaction[:spans][1][:data]['cache.key']).to eq(["my_cache_key_non_existing"]) expect(cache_transaction[:spans][1][:data]['cache.hit']).to eq(false) end end