Add more HBase batch tests#19039
Open
trask wants to merge 3 commits into
Open
Conversation
13e2224 to
9e9afb6
Compare
9e9afb6 to
8dfd08c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the HBase client test suite to add current-behavior coverage for Table.batch(...) ahead of upcoming db.operation.batch.size support. It replaces the two separate testBatchGet/testBatchPut methods with a single @ParameterizedTest driven by a BatchScenario builder, pinning today's behavior: an empty batch produces no span, and non-empty batches (single, same-type, mixed-type) report a Multi operation span with no batch-size attribute. Because traceAssertConsumer uses hasAttributesSatisfyingExactly, the tests will fail (signaling a needed update) once a batch-size attribute is emitted, making this a useful regression guard.
Changes:
- Replaced
testBatchGet/testBatchPutwith a parameterizedtestBatchcovering empty, single, same-type, and mixed-type action batches. - Added a
BatchScenariobuilder plusget(...)/put(...)helpers and abatchScenarios()MethodSource. - Removed the now-unused
ROW_5constant and added required imports (Stream,Row, JUnit params APIs).
trask
commented
Jun 19, 2026
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
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.
Add current-behavior batch coverage for HBase
Table.batch(...). The tests pin empty batch calls producing no span, non-empty batch calls being reported asMulti, and single, same-type, and mixed-type action batches continuing without adb.operation.batch.sizeexpectation.A follow-up PR will update HBase instrumentation (and these tests) to follow batch semantic conventions.