Skip to content

Replace wall-clock category-2 test sleeps (macOS flake risk) #171

Description

@dborgards

Severity

Medium

Location

  • Audit: docs/reviews/2026-09-25-delay-sleep-audit.md — 115 category-2 sleeps across 99 tests
  • Example flake: tests/.../UdsFunctionalClientTests.cs (approx. 232–258); macOS failure on 7029ad2 run 36234735257 (ContainSingle)
  • J1939TpChannel.cs (approx. line 109) — always new ProtocolActor() with wall clock; no ITimeSource injection

Problem

Many tests assume work finishes inside a wall-clock window. UDS P2 / functional windows use Stopwatch and CancelAfter. Those suites cannot move to ManualTimeSource until J1939TpChannel (and related seams) accept an injected actor/time source. Later pushes today are green, but the macOS flake risk remains.

Proposed fix

  1. Give J1939TpChannel the same optional actor / ITimeSource the node already has.
  2. Replace category-2 sleeps the audit marks red, starting with functional-window UDS tests.

Decision question

Is eliminating category-2 sleeps a release-blocking priority for 1.x, or a follow-up hardening track?

Review

From CanKit.Pro deep review of main @ 1cde1fc (2026-09-26).
Agent: https://cursor.com/agents/bc-39693a30-0a4f-5743-850f-1ab80aeb4dc5
Related: #92

Activity

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

Metadata

Metadata

Assignees

Labels

area: testsTest suite, coverage, API approvalsseverity/mediumMedium-severity finding from reviewtype: testsTest coverage — a missing, weak or flaky test

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions