Skip to content

Flaky tests #602

Closed as not planned
Closed as not planned

Description

@p-schlickmann

Hi team,

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?

Thanks!

Activity

  1. rosa commented on Jul 21, 2025

    @rosa
    Member

    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!

  2. rosa commented on Jul 23, 2025

    @rosa
    Member

    Looks like the flakiest test after the last improvements is this one:

    bin/rails test test/integration/instrumentation_test.rb:306
    

    I tried to make it better in f433a99 but that didn't work so well. I'll look into it later.

  3. p-schlickmann commented on Jul 23, 2025

    @p-schlickmann
    ContributorAuthor

    Yea I noticed test/integration/processes_lifecycle_test.rb is also quite flaky - I'm working on it

  4. diogovernier commented on Apr 9, 2026

    @diogovernier
    Contributor

    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

    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.

  5. rosa commented on Aug 29, 2026

    @rosa
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions