Skip to content

Speed up e2e(core) suite with Ginkgo procs and concurrent waits - #6070

Merged
ChrisJBurns merged 1 commit into
mainfrom
speeding-up-e2e-core-tests-over-11-minutes
Jul 27, 2026
Merged

ChrisJBurns merged 1 commit into
mainfrom
speeding-up-e2e-core-tests-over-11-minutes

Conversation

@ChrisJBurns

Copy link
Copy Markdown
Collaborator

Summary

  • The core E2E suite was taking >11 minutes because ~30 specs ran serially on an 8-core runner that had capacity to spare. This PR runs them across 4 Ginkgo processes, spreading the specs and reducing wall-clock time to an estimated ~3–4 minutes.
  • Four test files named servers using only GinkgoRandomSeed(), which is identical across all Ginkgo procs — concurrent processes would collide on the same Docker container name. Those are switched to GenerateUniqueServerName which embeds the OS PID.
  • ExpectMCPServersRunning previously polled workloads one at a time; specs that start 4 containers paid the full sum of readiness waits. Goroutines + WaitGroup make the wait concurrent (bounded by the slowest, not the sum), benefiting both single- and multi-process runs.

Type of change

  • Performance improvement (non-breaking change which improves speed)

Test plan

  • The CI run linked in the issue shows >11 min; the new procs: 4 matrix field will be exercised on the next CI run
  • go build ./test/e2e/... and go vet ./test/e2e/... pass locally with the changes
  • PROCS defaults to 1 for all other test matrix entries, so no other suite behaviour changes

Special notes for reviewers

--procs=N in Ginkgo v2 spawns N independent OS processes, each with its own BeforeSuite/AfterSuite. Core specs use the real Docker daemon with no per-process config isolation, so unique container names are the only required safety property — which GenerateUniqueServerName (PID + nanosecond timestamp + random seed) guarantees.

The procs matrix field is absent from all other suites, so they receive PROCS=1 (sequential) and are unaffected.

Generated with Claude Code

Run the core test suite across 4 Ginkgo processes in CI instead of
serially. The 8-core runner has capacity to spare, and the ~30 core
specs are independent enough to distribute safely.

Two issues blocked parallelism:
- Four test files named servers using only GinkgoRandomSeed(), which is
  identical across all procs; concurrent processes would attempt to
  create the same Docker container name. Switch to GenerateUniqueServerName
  which includes the OS PID (unique per proc).
- ExpectMCPServersRunning polled workloads sequentially; specs that start
  4 containers (group_rm "delete with workloads") paid the full sum of
  readiness waits. Replace the serial loop with concurrent goroutines so
  the wait is bounded by the slowest workload, not the sum.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the size/XS Extra small PR: < 100 lines changed label Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.20%. Comparing base (be0e0c3) to head (bdfe150).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6070      +/-   ##
==========================================
+ Coverage   72.18%   72.20%   +0.01%     
==========================================
  Files         721      721              
  Lines       75062    75062              
==========================================
+ Hits        54183    54196      +13     
+ Misses      17017    17005      -12     
+ Partials     3862     3861       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisJBurns
ChrisJBurns merged commit a099fa0 into main Jul 27, 2026
44 of 45 checks passed
@ChrisJBurns
ChrisJBurns deleted the speeding-up-e2e-core-tests-over-11-minutes branch July 27, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants