Skip to content

Commit

Permalink
Update specs to validate key - cache.hit still not working in 6.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikspang committed Oct 11, 2024
1 parent eb12fa7 commit 73b9c87
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,18 @@
Rails.cache.read("my_cache_key_non_existing")

transaction.finish

expect(transport.events.count).to eq(1)
cache_transaction = transport.events.first.to_hash
expect(cache_transaction[:type]).to eq("transaction")
expect(cache_transaction[:spans].count).to eq(2)
expect(cache_transaction[:spans][0][:op]).to eq("cache.get")
expect(cache_transaction[:spans][0][:origin]).to eq("auto.cache.rails")
expect(cache_transaction[:spans][0][:data]['cache.key']).to eq(["my_cache_key"])
expect(cache_transaction[:spans][0][:data]['cache.hit']).to eq(true)

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.hit']).to eq(false)
end
end
Expand Down

0 comments on commit 73b9c87

Please sign in to comment.