Skip to content

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

Open
alan-agius4 wants to merge 2 commits into
angular:mainfrom
alan-agius4:perf-e2e-speedup
Open

test: configure network-timeout and prefer-offline for yarn in e2e tests#34025
alan-agius4 wants to merge 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant