Skip to content

Enable parallel test execution with Rake multitask#58

Merged
chorrell merged 1 commit intomainfrom
parallel-test-execution
Feb 10, 2026
Merged

Enable parallel test execution with Rake multitask#58
chorrell merged 1 commit intomainfrom
parallel-test-execution

Conversation

@chorrell
Copy link
Owner

Summary

Implements parallel test execution using Rake's built-in feature, allowing Node.js 20 and 22 Docker image tests to run simultaneously.

Changes

  • Changed to for parallel execution
  • Modified test tasks to run RSpec in separate processes with isolated environments
  • Each test suite now gets its own environment variable per-process

Performance Impact

Before (Sequential):

  • Node.js 20 tests: ~17s
  • Node.js 22 tests: ~17s
  • Total: ~35 seconds

After (Parallel):

  • Both test suites run simultaneously
  • Total: ~18 seconds

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

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>
@chorrell chorrell force-pushed the parallel-test-execution branch from 74228f6 to 46e0761 Compare February 10, 2026 22:16
@chorrell chorrell merged commit 2374600 into main Feb 10, 2026
1 check passed
@chorrell chorrell deleted the parallel-test-execution branch February 10, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant