Rename double-remove TraceState tests and exercise a non-first entry - #8672
Draft
thswlsqls wants to merge 1 commit into
Draft
Rename double-remove TraceState tests and exercise a non-first entry#8672thswlsqls wants to merge 1 commit into
thswlsqls wants to merge 1 commit into
Conversation
|
|
Pull request dashboard statusWaiting on the author · refreshed 2026-07-31 13:26 UTC Move out of draft to request review. Status above doesn't look right?
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8672 +/- ##
=========================================
Coverage 91.45% 91.45%
Complexity 10462 10462
=========================================
Files 1021 1021
Lines 27680 27680
Branches 3244 3244
=========================================
Hits 25316 25316
Misses 1620 1620
Partials 744 744 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Follow-up to review comments on open-telemetry#8613, which were submitted after that PR had already been merged. Rename removeTwice, removeTwice_KeepsRemainingEntry and removeTwice_KeepsRemainingEntries to removeSameKeyTwice*, since all three remove the same key and the previous names did not say so. removeSameKeyTwice_KeepsRemainingEntries now removes SECOND_KEY rather than FIRST_KEY. ArrayBasedTraceStateBuilder.remove scans entries from the front, so removing the first key always matches on the first iteration; removing a middle key covers a later slot for the first time. Test-only: no production code, public API or asserted behavior changes.
thswlsqls
force-pushed
the
test/trace-state-remove-same-key-tests
branch
from
July 30, 2026 09:19
887981f to
a75c7ab
Compare
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.
Description
removeTwice,removeTwice_KeepsRemainingEntryandremoveTwice_KeepsRemainingEntriestoremoveSameKeyTwice*. All three remove the same key, which the previous names did not say.removeSameKeyTwice_KeepsRemainingEntriesnow removesSECOND_KEYrather thanFIRST_KEY.ArrayBasedTraceStateBuilder.removescans entries from the front, so removing the first key always matches on the first iteration; removing a middle key covers a later slot for the first time.Testing done
./gradlew :api:all:test --tests "io.opentelemetry.api.trace.TraceStateTest"— 41 tests passed, 0 skipped. The three renamed methods show up in the test report, so the rename did not drop them../gradlew :api:all:check— passed (test, spotless, ErrorProne/NullAway, jApiCmp).docs/apidiffs/current_vs_latest/update.