Skip to content

test(cli): installer suite cleanup can exceed the 10 s hook timeout #394

Closed

Description

@ElbertePlinio

Problem

packages/cli/test/installer.test.ts can fail after all its tests pass. Its afterAll hook removes the suite directory with fs.rmSync. That directory holds an npm cache and several package installs. On a slow runner the removal took longer than vitest's default 10 second hook timeout, so the suite failed with "Hook timed out in 10000ms" at installer.test.ts:148.

Seen in the CI run for main at 6495658 (run 40733416565). All 23 installer tests passed, and the suite took 56.5 s against 37 s on the PR run for the same tree. This turned main red right before the 0.7.0 tag (#377).

Acceptance criteria

  • The installer suite's cleanup hook has a timeout that fits removing the npm cache and installs on a loaded runner.
  • The installer suite passes locally, and the full CI passes on the fix.

Checklist

  • Give the cleanup hook its own timeout
  • Run the installer suite and the full CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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