Skip to content

CI sporadic timeouts in Windows after >20 minutes #821

@MikeMcC399

Description

@MikeMcC399

Situation

The workflow ci.yml is sporadically timing out in tests running under Windows. The affects both Node.js 20 & 22. (Due to issue #715 tests are not run on Node.js 24.)

Tests time out after around 20 minutes.

This is not a new issue, as logs show it failing already in Feb 2026. Before that date, only failures are recorded, the details logs have been automatically purged and so the cause is not visible.

When successful, the Windows tests complete in GitHub Actions after typically 12 - 16 minutes.
https://github.com/nodejs/corepack/actions/runs/24746336587/job/72398836168

Run locally under Windows 11 25H2, with Node.js 22.22.0, the test takes about 5 minutes to run, which is significantly faster than in GitHub Actions.

macOS & Ubuntu test runs in GitHub Actions for comparison take 2 - 4 minutes.

Logs

Example
https://github.com/nodejs/corepack/actions/runs/24627992703
https://github.com/nodejs/corepack/actions/runs/24627992703/job/72010269406

   ✓ should still validate devEngines.packageManager.version format when no user version specified  337ms

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  tests/main.test.ts > should support hydrating multiple package managers from cached archives
 FAIL  tests/main.test.ts > should support hydrating multiple package managers from cached archives
 FAIL  tests/main.test.ts > should support hydrating multiple package managers from cached archives
Error: Test timed out in 180000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
 ❯ tests/main.test.ts:1010:1
    1008| });
    1009|
    1010| it(`should support hydrating multiple package managers from cached arc…
       | ^
    1011|   await xfs.mktempPromise(async cwd => {
    1012|     await expect(runCli(cwd, [`pack`, `[email protected]`, `[email protected]`])).re…

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/5]⎯

 FAIL  tests/main.test.ts > should support hydrating multiple package managers from cached archives
 FAIL  tests/main.test.ts > should support hydrating multiple package managers from cached archives
Error: Hook timed out in 10000ms.
If this is a long-running hook, pass a timeout value as the last argument or configure it globally with "hookTimeout".
 ❯ tests/main.test.ts:13:1
     11|
     12|
     13| beforeEach(async () => {
       | ^
     14|   const home = await xfs.mktempPromise();

     15|

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions