Skip to content

test: make the memory stall timing assertion load-tolerant #512

Description

@LeXwDeX

Why

The dead-connection test for MemoryModel.drainWithLiveness asserts wall-clock < 200ms against a 40ms connectTimeout. On a loaded linux runner the timer scheduling measured 288ms (observed flake in a #505 CI run that passed unchanged on rerun). The implementation uses raw setTimeout, so TestClock cannot apply. The assertion's purpose is proving fail-fast works (not a hang), not bounding scheduler jitter.

Scope

  • packages/opencode/test/memory/memory.test.ts only.

Approach

  • Relax the wall-clock bound to 2000ms: still 50x the 40ms connectTimeout and far below the test-framework timeout, so it distinguishes fail-fast from hang while tolerating CI load jitter. Comment the load tolerance.
  • Keep the Stalled error-class assertion as the semantic check.

Acceptance

  • Test passes locally; no production code change; typecheck and lint unaffected.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions