Skip to content

Que 1.0 failing in Active Job tests #329

@skipkayhil

Description

@skipkayhil

See failing tests here: https://buildkite.com/rails/rails/builds/84165#63b89f96-f556-468a-a2a9-e14019d5c179

I believe the issue boils down to this assumption in the Que::ActiveJob::WrapperExtensions that the worker won't ever nest:

# There's no reason this logic should ever nest, because it wouldn't
# make sense to run a worker inside of a job, but even so, assert that
# nothing absurd is going on.
Que.assert NilClass, Thread.current[:que_current_job]

This makes sense in environments with real workers, but this doesn't hold true with inline/run_synchronously. In Active Job tests that include retry_on, the retried job will call this run method before the previous one has returned.

Metadata

Metadata

Assignees

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