Skip to content

Fix flake in TestRegistryLifecycle pnpm-style symlink test#3685

Open
jakebailey wants to merge 1 commit intomainfrom
jabaile/fix-TestRegistryLifecycle-flake
Open

Fix flake in TestRegistryLifecycle pnpm-style symlink test#3685
jakebailey wants to merge 1 commit intomainfrom
jabaile/fix-TestRegistryLifecycle-flake

Conversation

@jakebailey
Copy link
Copy Markdown
Member

Noticed this test flake: https://github.com/microsoft/typescript-go/actions/runs/25234356902/job/73997098962

--- FAIL: TestRegistryLifecycle (0.01s)
    --- FAIL: TestRegistryLifecycle/pnpm-style_symlinks_only_grant_granular_updates_to_workspace_packages (3.78s)
        registry_test.go:641: assertion failed: false (bool) != true (true bool): bucket should be dirty after registry package change
FAIL
FAIL	github.com/microsoft/typescript-go/internal/ls/autoimport	4.532s

Copilot AI review requested due to automatic review settings May 2, 2026 05:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a flaky auto-import registry lifecycle test by ensuring assertions read cache stats from the same request-time snapshot that observed the file change, avoiding races with background auto-import warming that can advance the session snapshot.

Changes:

  • Switch the pnpm-style symlink test to read AutoImportRegistry cache stats from the snapshot provided by Session.WithLanguageServiceAndSnapshot instead of session.Snapshot().
  • Add the needed internal/ls import to type the callback parameter.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants