parse-community / parse-community/parse-server

Speed up CI by running the test suite in parallel

Open
#10,615 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:ci
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Feature / Enhancement Checklist
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.js hardcodes 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/1 and should use the helper's exported serverURL; mock servers on fixed ports move to listen(0)
  • top-level beforeAll/afterAll in spec/helper.js aren't supported in parallel mode and need converting
  • CurrentSpecReporter and 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.