Skip to content

Two tests flaky under parallel CI load (S27 sql_analyze + trace snapshot) #879

Description

@anandgupta42

Problem

Two tests pass locally but fail consistently in CI's parallel run (9474 tests / 378 files), failing identically on unrelated PRs (#854, #858, #863) and blocking all of them. The repo's "no flaky tests under resource contention" case.

  1. test/session/real-tool-simulation.test.tsS27: sql_analyze with parse error. The progressive-suggestion dedup is a module-global Set; the beforeEach reset used a dynamic await import that can resolve to a different module instance than the tool's static import under parallel CI → real Set never reset → S27 sees no suggestion.
  2. test/altimate/tracing-adversarial-snapshot.test.tsbuildTraceFile shows 'running' status. Waited a fixed 50ms for a debounced async snapshot write — too short under CI load → reads a stale snapshot.

Fix

  • S27: static import of PostConnectSuggestions (same instance the tools use) + explicit reset in the test.
  • Trace test: poll the on-disk status until expected instead of a fixed sleep.

Unblocks #854/#858/#863.

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