diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c25e7cb0..7d2360ffd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### Features - Add `include_sentry_event` matcher for RSpec [#2424](https://github.com/getsentry/sentry-ruby/pull/2424) -- Add support for Sentry Cache instrumentation, when using Rails.cache ([#2380](https://github.com/getsentry/sentry-ruby/pull/2380)) (MemoryStore and FileStore require Rails 8.0+) +- Add support for Sentry Cache instrumentation, when using Rails.cache ([#2380](https://github.com/getsentry/sentry-ruby/pull/2380)) - Add support for Queue Instrumentation for Sidekiq. [#2403](https://github.com/getsentry/sentry-ruby/pull/2403) Note: MemoryStore and FileStore require Rails 8.0+ diff --git a/sentry-sidekiq/spec/spec_helper.rb b/sentry-sidekiq/spec/spec_helper.rb index 1cbc2a60d..e712a6a0f 100644 --- a/sentry-sidekiq/spec/spec_helper.rb +++ b/sentry-sidekiq/spec/spec_helper.rb @@ -235,13 +235,14 @@ def execute_worker(processor, klass, **options) end jid = options.delete(:jid) || "123123" + timecop_delay = options.delete(:timecop_delay) msg = Sidekiq.dump_json(created_at: Time.now.to_f, enqueued_at: Time.now.to_f, jid: jid, class: klass, args: [], **options) - Timecop.freeze(options[:timecop_delay]) if options[:timecop_delay] + Timecop.freeze(timecop_delay) if timecop_delay work = Sidekiq::BasicFetch::UnitOfWork.new('queue:default', msg) process_work(processor, work) ensure - Timecop.return if options[:timecop_delay] + Timecop.return if timecop_delay end def process_work(processor, work)