Skip to content

Telemetry proxy test: no longer depends on which export is in flight - #311

Merged
Mpdreamz merged 1 commit into
mainfrom
fix/telemetry-proxy-test-race
Nov 19, 2026
Merged

Mpdreamz merged 1 commit into
mainfrom
fix/telemetry-proxy-test-race

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

TelemetryProxyTests.aFullBufferDropsTheOldestAndCountsIt failed once on CI (forwarded was 3, expected 2) and passed on re-run.

It is not a forwarder defect. An export that is already in flight when the buffer drops it is still delivered, and counted as forwarded; which export is in flight depends on when the drain task starts, which varies with load. The test now holds every send on a continuation until all five are enqueued and the counts are read (dropped 3, pending 2, forwarded 0), then lets the sends through and asserts what holds whichever export was in flight: the bodies received end with "3","4" in order, there are two or three of them, and forwarded equals the number received. No sleeping.

Verified: the old test never failed naturally on an idle machine (0 in 1200 runs), so I forced the CI condition (wait until item 0 is in flight before enqueuing the rest): old test failed 200 of 200, new test 0 of 200. Changing the buffer to drop the newest instead of the oldest still fails the new test. The 13 TelemetryProxyTests pass; lint is clean. Only the test file changes.

🤖 Generated with Claude Code

…annot change the counts

aFullBufferDropsTheOldestAndCountsIt failed once on CI (forwarded 3, not 2): the
forwarder starts sending at the first enqueue, and an export in flight when the
buffer fills is delivered (and counted) though it was dropped from the queue.
The test now holds every send until all five are in and the drop counts are read,
and asserts what holds whichever export was in flight.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions github-actions Bot added the bug Something isn't working label Nov 19, 2026
@Mpdreamz
Mpdreamz merged commit 7222ea9 into main Nov 19, 2026
6 checks passed
@Mpdreamz
Mpdreamz deleted the fix/telemetry-proxy-test-race branch November 19, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant