parse-community / parse-community/parse-server
Speed up CI by running the test suite in parallel
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Feature / Enhancement Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Current Limitation
Every PR runs the full jasmine suite (135 spec files, ~3,500 tests) serially in a single Node process, 8 times over (5 MongoDB variants + 3 Postgres variants in ci.yml). Each job takes up to 20 minutes while the runner's 4 vCPUs sit mostly idle, so PR feedback time is bounded by a slow serial run repeated per environment.
Feature / Enhancement Description
Jasmine 5 supports parallel execution via worker processes (--parallel=N). Workers are separate Node processes, so all in-process state (the booted Parse Server, Cloud Code hooks, the Parse global) is naturally isolated per worker, and jasmine hands spec files to idle workers dynamically, which self-balances load. The suite already passes with random: true, which is the main precondition for parallel mode.
The shared resources are the only real collisions, and they're bounded:
spec/helper.jshardcodes port 8378 and one database; each worker instead picks a free port and a per-worker database name (parse_test_<pid>) on the same mongod/postgres instance- 48 spec files hardcode
http://localhost:8378/1and should use the helper's exportedserverURL; mock servers on fixed ports move tolisten(0) - top-level
beforeAll/afterAllinspec/helper.jsaren't supported in parallel mode and need converting CurrentSpecReporterand the flaky retry patch track a single current spec and need to key by spec id instead- CI enables
--parallel; serial stays the default locally so single-file debugging is unchanged
Expected result: roughly 3-4x faster test jobs with no increase in total CI minutes, since nothing about job setup is duplicated.
Example Use Case
n/a (CI / developer experience)
Alternatives / Workarounds
- Shard spec files across more matrix jobs: cuts wall clock but duplicates
npm ci/ build / DB startup per shard, so total minutes go up - Run fewer environments per PR with the full matrix on push to
alpha: complementary, worth its own issue - #9467 proposes a separate mocked unit test suite; this issue parallelises the existing e2e suite without changing the testing approach
3rd Party References
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read spec/helper.js and ci.yml first, then locate the 48 hardcoded server URLs, fixed-port mock servers, and the CurrentSpecReporter and flaky retry code mentioned in the issue. Check the Jasmine parallel-execution documentation before changing the worker setup. Done means CI enables parallel workers across the existing MongoDB and PostgreSQL jobs while serial local execution and single-file debugging remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb, node.js, postgresql
- Domain
- ci-cd, developer-experience, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100