Skip to content

isRecorderProcess Windows test times out at vitest's 5 s default under load #373

Closed

Description

@TMHSDigital

Summary

The Windows test "isRecorderProcess on Windows (#299) > matches a pid's real image only" runs under vitest's default 5 s timeout but spawns tasklist twice. Under full-suite load it can take longer than that and fail. This is the same kind of slow-process-start flake as #372.

Where

  • src/__tests__/lifecycleStop.test.ts:191 (no explicit timeout)
  • src/utils/processes.ts (isRecorderProcess, a synchronous tasklist call per lookup)

Details

Seen in a local full run of npx vitest run on Windows 11 at 1ac339f, with all other tests passing:

FAIL src/__tests__/lifecycleStop.test.ts > isRecorderProcess on Windows (#299) > matches a pid's real image only
Error: Test timed out in 5000ms.

The test calls isRecorderProcess(process.pid, ...) twice, so it spawns tasklist twice. Each spawn can take a few seconds on a loaded machine. The other process-backed tests in sessions.test.ts already allow 30 s or more.

Impact

Intermittent red runs on Windows, locally and possibly on the Windows CI legs. A red CI run skips the npm publish.

Steps to reproduce

  1. On Windows, run the full suite: npx vitest run.
  2. Under load, the test sometimes exceeds 5 s.

Suggested fix

Give the test an explicit timeout in line with the other process tests (for example 30_000).

Acceptance criteria

  • The test has a timeout that covers two tasklist spawns on a loaded runner

Getting started

  • Relevant files: src/__tests__/lifecycleStop.test.ts
  • How to run tests: npx vitest run src/__tests__/lifecycleStop.test.ts

Related: #372


Filed by repo-audit/fix-issues at 1ac339f. Severity: low. Effort: S. audit-key: testing|src/__tests__/lifecycleStop.test.ts|isRecorderProcess-timeout

Activity

  1. added
    good first issue
    priority: low
    testing
    effort: small
    on Nov 19, 2026
  2. TMHSDigital commented on Nov 19, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in 5476d7e: the Windows isRecorderProcess test now has a 30_000 ms timeout, matching the other process tests in sessions.test.ts. Verified: lifecycleStop.test.ts passes locally (7/7), lint and typecheck clean.

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

    effort: smallgood first issuepriority: lowtesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions