chore: isolate test runs with forking_test_runner#762
Draft
chore: isolate test runs with forking_test_runner#762
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the test infrastructure by adopting the forking_test_runner gem to isolate test execution and enable parallel test runs. This approach addresses race conditions from shared global state and allows testing different Rails initialization contexts in integration tests.
Key changes include:
- Integration of forking_test_runner with parallel execution (4 workers)
- Refactored test organization with explicit configuration per integration spec file
- Standardized RSpec syntax throughout the test suite
- Cleaned up test setup to separate unit tests (no external dependencies), integration tests (framework dependencies), and CLI tests
Reviewed changes
Copilot reviewed 99 out of 99 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Rakefile | Replaced RSpec task definitions with forking-test-runner invocation; added flexible spec task with suite selection |
| spec/spec_helper.rb | Reorganized to support parallel test runners with unique Aruba directories; moved framework-specific hooks to appropriate contexts |
| spec/integration/rails_helper.rb | Simplified Rails initialization to run once per spec file instead of using shared hooks |
| spec/integration/rails/*.rb | Added file-level Honeybadger configuration for isolated test execution |
| spec/cli/*.rb | Converted from feature/scenario to RSpec.describe/context; updated to use type: :aruba |
| spec/unit/**/*.rb | Standardized to use RSpec.describe instead of bare describe |
| spec/support/aruba_helpers.rb | Renamed module from FeatureHelpers to ArubaHelpers |
| gemfiles/*.gemfile | Added forking_test_runner dependency; removed bump gem; added reline and standard |
| lib/honeybadger/rack/error_notifier.rb | Removed unused require for rack/request |
| tools/release.rb | Removed deprecated release tooling |
| .github/workflows/ruby.yml | Updated to use new spec task syntax |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
I don't remember why I moved it here in the first place.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR uses forking_test_runner gem to run the tests, which isolates each spec file when running multiple specs together. This solves two problems:
I also cleaned up a bunch of things and tried to make the test setup more explicit. We should follow these rules in the future:
Rails,Rack,ActiveSupport::Notifications, etc.)