Enable parallel test execution with Rake multitask#58
Merged
Conversation
Changes: - Use 'multitask' instead of 'task' for spec:all to run tests in parallel - Run each RSpec suite in separate process with isolated environment - Pass TARGET_HOST via environment variable per-process instead of globally Performance improvement: - Sequential execution: ~35 seconds - Parallel execution: ~18 seconds - Speedup: ~47% faster (nearly 2x) This allows Node.js 20 and 22 Docker image tests to build and run simultaneously, significantly reducing CI/CD pipeline time. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
74228f6 to
46e0761
Compare
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.
Summary
Implements parallel test execution using Rake's built-in feature, allowing Node.js 20 and 22 Docker image tests to run simultaneously.
Changes
Performance Impact
Before (Sequential):
After (Parallel):
Result: ~47% speedup (nearly 2x faster) 🚀
Technical Details
The previous implementation used which set globally, causing race conditions when tasks ran in parallel. The new implementation runs each RSpec suite in a separate subprocess with its own environment, ensuring complete isolation.
Testing
✅ Both test suites pass successfully in parallel
✅ No race conditions or environment variable conflicts
✅ Verified speedup with timing measurements
✅ Output is interleaved but tests complete correctly