Skip to content

v5.1.0

Latest
Compare
Choose a tag to compare
@wspurgin wspurgin released this 07 Mar 18:58
· 2 commits to main since this release

Features

🎱 Sidekiq 8 Support

πŸ™‡ @jukra fixed our incompatibility through #233

with_context matcher

To add coverage for testing anything set on the Job context. Whether through something like the Current Attributes middleware or setting things directly on the Job.

expect {
  AwesomeJob.set(trace_id: "something").perform_async
}.to enqueue_sidekiq_job.with_context(trace_id: anything)

AwesomeJob.set(retry: 5).perform_async
expect(AwesomeJob).to have_enqueued_sidekiq_job.with_context(retry: 5)

# Something set through the Current Attributes middleware
expect(AwesomeJob).to have_enqueued_sidekiq_job.with_context(cattr: hash_including("my_special_attribute" => anything()))

⏲️ Sidekiq Enterprise unique until sub matcher

πŸ™‡ added in #232 by @wizardofelves (updating the original work from @leviwilson in #147)

# in e.g., AwesomeJob
sidekiq_options unique_for: 1.hour, unique_until: :start

# in spec
it { is_expected.to be_unique.until(:start) }

What's Changed

New Contributors

Full Changelog: v5.0.0...v5.1.0