Skip to content

Proposal to add official support and document using Solid Queue in a test environment #711

@jdufresne

Description

@jdufresne

Typically, I try to keep my test environment as close to production as possible so that I have confidence that my test suite reflects real user facing behavior. For example, my tests run against PostgreSQL and its enhanced features rather than SQLite or a mocked database.

I'd like to apply this same principle when using ActiveJob with Solid Queue by running the Solid Queue adapter in my test environment instead of relying on the ActiveJob test adapter.

I believe that doing so would make it easier to validate my integration of Solid-Queue-specific functionality such as limits_concurrency. Without this, some features are effectively hidden behind the test adapter, which reduces confidence that integrations are working as expected.

AFAICT, using Solid Queue in tests lacks the helpers provided by the ActiveJob test adapter (for example enqueued_jobs or perform_enqueued_jobs).

It would be helpful if Solid Queue provided similar test helpers to inspect, run, and clear jobs. Alternatively, documentation outlining recommended testing patterns, limitations, and best practices would still go a long way in making this easier to adopt and provide official support.

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