Skip to content

test: configure network-timeout and prefer-offline for yarn in e2e tests - #34025

Merged
alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:perf-e2e-speedup
Sep 8, 2026
Merged

test: configure network-timeout and prefer-offline for yarn in e2e tests#34025
alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:perf-e2e-speedup

Conversation

@alan-agius4

@alan-agius4 alan-agius4 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Yarn Classic in the E2E test sandbox defaults to a 30-second socket timeout and performs multiple sequential retries on network stalls, which can cause shards with multiple package installations to run for excessive amounts of time when external registry latency or socket stalls occur.

What is the new behavior?

Configures .yarnrc with network-timeout 15000 and prefer-offline true in the E2E npm sandbox (tests/e2e/setup/001-npm-sandbox.ts) to fail faster on stalled connections and avoid hanging during package resolution while remaining resilient to transient CI latency.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request defines a new WEBPACK_TESTS list in tests/e2e.bzl and configures webpack e2e suites to use it. It also updates the Yarn sandbox configuration in tests/e2e/setup/001-npm-sandbox.ts to include a 10-second network timeout and prefer offline mode. The reviewer suggests increasing the network timeout to 15 seconds to prevent potential test flakiness in CI environments.

Comment thread tests/e2e/setup/001-npm-sandbox.ts
@alan-agius4 alan-agius4 changed the title test: optimize E2E test suites and tune Yarn network configuration test: configure network-timeout and prefer-offline for yarn in e2e tests Sep 4, 2026
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Sep 4, 2026
@alan-agius4
alan-agius4 requested a review from clydin September 4, 2026 08:48
@alan-agius4
alan-agius4 requested review from clydin and dgp1130 and removed request for clydin and dgp1130 September 7, 2026 13:51
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 8, 2026
@alan-agius4
alan-agius4 merged commit bc8db5a into angular:main Sep 8, 2026
40 checks passed
@alan-agius4
alan-agius4 deleted the perf-e2e-speedup branch September 8, 2026 15:48
@alan-agius4

Copy link
Copy Markdown
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants