Repository navigation
Telemetry proxy test: no longer depends on which export is in flight - #311
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TelemetryProxyTests.aFullBufferDropsTheOldestAndCountsItfailed once on CI (forwardedwas 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
forwardedequals 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
TelemetryProxyTestspass; lint is clean. Only the test file changes.🤖 Generated with Claude Code