Skip to content

refactor(bigtable): move common otel mocks to testing_util - #16361

Open
scotthart wants to merge 2 commits into
googleapis:mainfrom
scotthart:testing_otel_metrics_mocks
Open

refactor(bigtable): move common otel mocks to testing_util#16361
scotthart wants to merge 2 commits into
googleapis:mainfrom
scotthart:testing_otel_metrics_mocks

Conversation

@scotthart

Copy link
Copy Markdown
Member

No description provided.

@scotthart
scotthart requested a review from a team as a code owner August 20, 2026 19:40
@product-auto-label product-auto-label Bot added the api: bigtable Issues related to the Bigtable API. label Aug 20, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors OpenTelemetry metrics testing utilities by extracting duplicated mock classes (MockHistogram, MockCounter, MockMeter, MockMeterProvider) and the MakeAttributesMap helper function from Bigtable internal tests into shared testing utilities under google/cloud/testing_util. Feedback on the new headers suggests correcting the included OpenTelemetry headers to directly include the required KeyValueIterable and nostd types instead of relying on transitive or incorrect includes.

Comment thread google/cloud/testing_util/mock_opentelemetry_metrics.h Outdated
Comment thread google/cloud/testing_util/opentelemetry_attributes.h Outdated
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.23%. Comparing base (31a0d9f) to head (b8b8b2c).

Files with missing lines Patch % Lines
...le/cloud/testing_util/mock_opentelemetry_metrics.h 26.31% 14 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16361   +/-   ##
=======================================
  Coverage   92.23%   92.23%           
=======================================
  Files        2237     2239    +2     
  Lines      210251   210227   -24     
=======================================
- Hits       193928   193913   -15     
+ Misses      16323    16314    -9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants