You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand the current state of the test suite is not ideal - some tests are flaky.
I'd love to help improve this. Ensuring test reliability should be a top priority, especially for an open-source tool that's the default queue mechanism in Rails 8.
@rosa I created this issue so we can discuss it further - do you have any advice or suggestions before I start digging in?
Hey @p-schlickmann, yes. All these tests that fork processes and rely on waiting on things to happen elsewhere are quite flaky indeed. I don't have any particular suggestions to start looking, I'm afraid, but any help here would be quite welcome!
Run bin/rails test
Run options: --seed 8690
# Running:
bundler: failed to load command: puma (/home/runner/work/solid_queue/solid_queue/vendor/bundle/ruby/3.1.0/bin/puma)
/home/runner/work/solid_queue/solid_queue/vendor/bundle/ruby/3.1.0/gems/puma-7.2.0/lib/puma/binder.rb:344:in `initialize': Address already in use - bind(2) for "127.0.0.1" port 9222 (Errno::EADDRINUSE)
Would love your thoughts on the approach. Happy to explore a different direction if this doesn't feel right.
Also noticed another flaky test failing in the PR (seems unrelated to the Puma issue). I'm happy to dig into that as well.
Closing this one, as the work ended up happening in PRs rather than here. Huge thanks to @p-schlickmann for the whole series (#615, #654, #663, #664, #671, #678, #681, #684, #686), and to everyone who chased the rest since: #733, #734, #758, #766, #767, #773, #775, #776 and #782 fixed the remaining known flakes, including the two named in this thread (the recurring-task instrumentation test got a deterministic wait, and processes_lifecycle_test was split per mode and hardened several times).
Some tests are still flaking on CI as of this month, though, so I've opened #797 with a catalogue of everything that has failed since mid-August, with links to the runs, so they don't get lost in a general one. Let's continue there.
Activity
rosa commentedon Jul 21, 2025
Hey @p-schlickmann, yes. All these tests that fork processes and rely on waiting on things to happen elsewhere are quite flaky indeed. I don't have any particular suggestions to start looking, I'm afraid, but any help here would be quite welcome!
Fix flaky test for process recovery
Improve flakiness of an instrumentation test
rosa commentedon Jul 23, 2025
Looks like the flakiest test after the last improvements is this one:
I tried to make it better in f433a99 but that didn't work so well. I'll look into it later.
p-schlickmann commentedon Jul 23, 2025
Yea I noticed
test/integration/processes_lifecycle_test.rbis also quite flaky - I'm working on itdiogovernier commentedon Apr 9, 2026
Hey folks! 👋
I opened this PR to address a flaky test we've been seeing: #733
It's related to this failure: https://github.com/rails/solid_queue/actions/runs/24190892956/job/70607570480?pr=732
Would love your thoughts on the approach. Happy to explore a different direction if this doesn't feel right.
Also noticed another flaky test failing in the PR (seems unrelated to the Puma issue). I'm happy to dig into that as well.
Wait for polling queries in logging tests instead of sleeping
Wait for polling queries in logging tests instead of sleeping
Keep semaphore slots held while blocked jobs are enqueued in concurre…
Wait for polling queries in logging tests instead of sleeping
Keep semaphore slots held while blocked jobs are enqueued in concurre…
Give in-flight jobs enough pause to survive slow shutdowns in tests
rosa commentedon Aug 29, 2026
Closing this one, as the work ended up happening in PRs rather than here. Huge thanks to @p-schlickmann for the whole series (#615, #654, #663, #664, #671, #678, #681, #684, #686), and to everyone who chased the rest since: #733, #734, #758, #766, #767, #773, #775, #776 and #782 fixed the remaining known flakes, including the two named in this thread (the recurring-task instrumentation test got a deterministic wait, and
processes_lifecycle_testwas split per mode and hardened several times).Some tests are still flaking on CI as of this month, though, so I've opened #797 with a catalogue of everything that has failed since mid-August, with links to the runs, so they don't get lost in a general one. Let's continue there.