test: optimize and stabilize e2e tests - #33813
Merged
alan-agius4 merged 1 commit intoAug 7, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors several end-to-end tests to improve performance and stability. Notably, it removes a deprecated test, simplifies Vite dependency optimization cache testing, adds stability flags to Puppeteer, and refactors artifact generation in Vitest tests to write files directly to disk instead of spawning multiple CLI commands. Regarding the feedback, a potential issue was identified in the Vitest test refactoring where writing a large number of files concurrently using Promise.all could exceed the operating system's file descriptor limit, and a suggestion was provided to limit the concurrency.
- Generate test artifacts directly via asynchronous file writes in `tests/vitest/larger-project.ts` instead of executing 500 `ng generate` CLI child processes. - Remove redundant initial `ng test` execution in `tests/test/test-scripts.ts`. - Fix regex matching in `tests/vite/reuse-dep-optimization-cache.ts` to directly await `/dependencies optimized/`, eliminating race conditions and timeouts. - Add `--disable-dev-shm-usage` and `--disable-gpu` flags to Chromium launch arguments in `tests/utils/puppeteer.ts` for container and sandbox stability. Benchmark results: - `tests/vitest/larger-project`: 155.60s -> 42.34s (-113.26s / -72.8%) - `tests/test/test-scripts`: 12.62s -> 8.84s (-3.78s / -29.9%) - `tests/vite/reuse-dep-optimization-cache`: timeout/failure -> 12.53s (passed)
alan-agius4
force-pushed
the
test/e2e-performance-and-stability
branch
from
August 7, 2026 18:11
c021078 to
b2d69db
Compare
clydin
approved these changes
Aug 7, 2026
Collaborator
Author
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 of Changes
tests/e2e/tests/vitest/larger-project.tsrather than spawning 500ng generateCLI child processes.ng testexecution intests/e2e/tests/test/test-scripts.ts.tests/e2e/tests/vite/reuse-dep-optimization-cache.tsto directly await/dependencies optimized/.--disable-dev-shm-usageand--disable-gpuflags to Chromium launch arguments intests/e2e/utils/puppeteer.tsfor container/sandbox stability.Benchmark Results
tests/vitest/larger-projecttests/test/test-scriptstests/vite/reuse-dep-optimization-cache