Skip to content

fix(specs): stop sidekiq-scheduler after each test#2897

Merged
solnic merged 1 commit intomasterfrom
solnic/fix-flaky-spec
Mar 17, 2026
Merged

fix(specs): stop sidekiq-scheduler after each test#2897
solnic merged 1 commit intomasterfrom
solnic/fix-flaky-spec

Conversation

@solnic
Copy link
Collaborator

@solnic solnic commented Mar 17, 2026

Otherwise this may happen:

    1) Sentry::Sidekiq::Cron::Job sidekiq-cron adds job to sidekiq within transaction
      Failure/Error: expect(::Sidekiq::Queue.new.size).to eq(2)

        expected: 2
              got: 5

        (compared using ==)
      # ./spec/sentry/sidekiq/cron/job_spec.rb:124:in `block in <main>'

  Finished in 6.23 seconds (files took 4.01 seconds to load)
  75 examples, 1 failure, 2 pending

  Failed examples:

  rspec ./spec/sentry/sidekiq/cron/job_spec.rb:118 # Sentry::Sidekiq::Cron::Job sidekiq-cron adds job to sidekiq within transaction

Otherwise this may happen:

```
    1) Sentry::Sidekiq::Cron::Job sidekiq-cron adds job to sidekiq within transaction
      Failure/Error: expect(::Sidekiq::Queue.new.size).to eq(2)

        expected: 2
              got: 5

        (compared using ==)
      # ./spec/sentry/sidekiq/cron/job_spec.rb:124:in `block in <main>'

  Finished in 6.23 seconds (files took 4.01 seconds to load)
  75 examples, 1 failure, 2 pending

  Failed examples:

  rspec ./spec/sentry/sidekiq/cron/job_spec.rb:118 # Sentry::Sidekiq::Cron::Job sidekiq-cron adds job to sidekiq within transaction
```
@solnic solnic marked this pull request as ready for review March 17, 2026 13:35
@solnic solnic requested review from dingsdax and sl0thentr0py March 17, 2026 13:43
@solnic solnic merged commit 84e50c5 into master Mar 17, 2026
135 checks passed
@solnic solnic deleted the solnic/fix-flaky-spec branch March 17, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants