Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test ActiveJob perform_all_later #2330

Merged
merged 10 commits into from
Nov 22, 2023
Merged

Test ActiveJob perform_all_later #2330

merged 10 commits into from
Nov 22, 2023

Conversation

hannahramadan
Copy link
Contributor

Add test for ActiveJob perform_all_later, introduced in Rails 7.1.0.

Closes #2222

Copy link
Contributor

SimpleCov Report

Coverage Threshold
Line 94.22% 94%
Branch 82.78% 82%

@hannahramadan hannahramadan marked this pull request as ready for review November 22, 2023 19:19
fallwith
fallwith previously approved these changes Nov 22, 2023
skip if Gem::Version.new(Rails::VERSION::STRING) < Gem::Version.new('7.1.0')

in_web_transaction do
ActiveJob.perform_all_later(MyJob.new)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs for this method make it sound like the method is intended for multiple jobs. Would you mind adding a test that looks at how the agent behaves when multiple jobs are given to perform_all_later?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great call out! Updated the test to include multiple jobs.

@hannahramadan hannahramadan merged commit e4f2bba into dev Nov 22, 2023
25 checks passed
@hannahramadan hannahramadan deleted the perform_all_later branch November 22, 2023 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Rails v7.1: Author tests to confirm "perform_all_later" jobs are instrumented well
4 participants