Skip to content

flake: TestAwaitDeliveryExactCount #1603

@flake-investigator

Description

@flake-investigator

CI Run: https://github.com/coder/coder/actions/runs/27807973934
Job: test-go-pg (windows-2022)
Failure time: 2026-06-19 06:09 UTC
Commit: 0d573587e8f4d386ec07782c8db944ab94ee01a6 (Andrew Aquino)

Failure:

=== FAIL: coderd/x/nats/natsbench TestAwaitDeliveryExactCount (0.00s)
    workload_internal_test.go:55:
        Error: "0s" is not positive
        Test: TestAwaitDeliveryExactCount

DONE 26037 tests, 173 skipped, 7 failures in 1258.762s

Error analysis:

  • The test asserts require.Positive(t, dur) where dur comes from awaitDelivery(ctx, time.Now()).
  • On Windows, time.Since(hot) can report 0s when allDone closes within the same clock tick, causing the positivity assertion to fail.
  • No panic/OOM/race indicators observed in the job logs around the failure.

Root cause:

  • Flaky test due to coarse timer resolution on Windows causing a zero duration measurement.

Assignment analysis:

  • Intended blame: git blame -L 24,48 coderd/x/nats/natsbench/workload_internal_test.go (line range for TestAwaitDeliveryExactCount).
  • Using available history (git log --oneline --follow coderd/x/nats/natsbench/workload_internal_test.go), the test and awaitDelivery logic were introduced in commit ea1379d4 ("chore: add nats benchmarking pkg") by Jon Ayers (not assignable).
  • Next most recent non-trivial change in this component is coderd/x/nats commit 21aa295 ("refactor NATS pubsub") by Spike Curtis, so assigning to @spikecurtis for triage.

Related issues:

  • Searched coder/internal for TestAwaitDeliveryExactCount, workload_internal_test.go, "0s" is not positive, and natsbench (open + closed, last 30 days). No matches for this failure mode.

Reproduction (likely flaky):

  • Windows: go test ./coderd/x/nats/natsbench -run TestAwaitDeliveryExactCount

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions