Skip to content

Bug: nonblockingdelaytests-wall-clock-flake #694

Description

@drmoisan
  • Work Mode: full-bug

Summary

NonBlockingDelayTests.WaitAsync_WithNoDispatcher_CompletesAfterInterval in TaskMaster.Test/AppGlobals/NonBlockingDelayTests.cs waits on a real wall-clock interval instead of a fake/virtual clock, violating this repository's own determinism rule (.claude/rules/general-unit-test.md: no Thread.Sleep/Task.Delay/real wall-clock waits in tests; async tests must use a fake-timer/FakeTimeProvider facility).

Environment

  • OS/version: Windows, MSTest
  • Command/flags used: vstest.console.exe against TaskMaster.Test.dll
  • Data source or fixture: TaskMaster.Test/AppGlobals/NonBlockingDelayTests.cs

Steps to Reproduce

  1. Run NonBlockingDelayTests.WaitAsync_WithNoDispatcher_CompletesAfterInterval repeatedly, or under load/CI contention.
  2. Observe the test waits on a real wall-clock interval to elapse rather than advancing a fake/virtual timer.
  3. Under scheduler contention or a slow CI runner, the wait can complete later or less predictably than intended, producing flaky pass/fail behavior.

Expected Behavior

The test should use a controllable clock or fake-timer facility (per .claude/rules/general-unit-test.md's Determinism Infrastructure section) so elapsed-time behavior is simulated deterministically rather than waiting on the real clock.

Actual Behavior

The test performs a real wall-clock wait, which is a banned pattern under this repository's determinism rules and is a source of flakiness under load.

Logs / Screenshots

  • Attached minimal logs or screenshot
  • Snippet: parallel-run bugs-635-440 final report: "NonBlockingDelayTests.WaitAsync_WithNoDispatcher_CompletesAfterInterval is a wall-clock flake violating the repo's own determinism rule; fix patterns exist at d208fa68 and 2b8ff3ef."

Impact / Severity

  • Blocker
  • High
  • Medium
  • Low

Source

From: docs/features/potential/2026-08-29-nonblockingdelaytests-wall-clock-flake.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions