Skip to content

Add more HBase batch tests#19039

Open
trask wants to merge 3 commits into
open-telemetry:mainfrom
trask:hbase-batch-current-behavior-tests
Open

Add more HBase batch tests#19039
trask wants to merge 3 commits into
open-telemetry:mainfrom
trask:hbase-batch-current-behavior-tests

Conversation

@trask

@trask trask commented Jun 18, 2026

Copy link
Copy Markdown
Member

Add current-behavior batch coverage for HBase Table.batch(...). The tests pin empty batch calls producing no span, non-empty batch calls being reported as Multi, and single, same-type, and mixed-type action batches continuing without a db.operation.batch.size expectation.

A follow-up PR will update HBase instrumentation (and these tests) to follow batch semantic conventions.

@trask trask force-pushed the hbase-batch-current-behavior-tests branch 2 times, most recently from 13e2224 to 9e9afb6 Compare June 18, 2026 23:24
@trask trask force-pushed the hbase-batch-current-behavior-tests branch from 9e9afb6 to 8dfd08c Compare June 18, 2026 23:28
@trask trask requested a review from Copilot June 19, 2026 17:05
@trask trask changed the title Add HBase current-behavior batch tests [Tests only] Add more HBase batch tests Jun 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/testBatchPut with a parameterized testBatch covering empty, single, same-type, and mixed-type action batches.
  • Added a BatchScenario builder plus get(...)/put(...) helpers and a batchScenarios() MethodSource.
  • Removed the now-unused ROW_5 constant and added required imports (Stream, Row, JUnit params APIs).

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@trask trask marked this pull request as ready for review June 19, 2026 18:32
@trask trask requested a review from a team as a code owner June 19, 2026 18:32
@trask trask changed the title [Tests only] Add more HBase batch tests Add more HBase batch tests Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants