Skip to content

test(spanner): test built-in metrics for unary RPCs - #6505

Open
olavloite wants to merge 1 commit into
googleapis:mainfrom
olavloite:spanner-built-in-metrics-mock-server-tests
Open

test(spanner): test built-in metrics for unary RPCs#6505
olavloite wants to merge 1 commit into
googleapis:mainfrom
olavloite:spanner-built-in-metrics-mock-server-tests

Conversation

@olavloite

Copy link
Copy Markdown
Contributor

Adds tests for built-in metrics for unary RPCs.

Adds tests for built-in metrics for unary RPCs.
@olavloite
olavloite requested review from a team as code owners August 22, 2026 09:16
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the Spanner API. label Aug 22, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors the observability mock tests in mock_tests.rs by replacing a manual atomic counter with mockall::Sequence for sequential mock expectations. It also adds a comprehensive suite of new mock tests to verify that internal client metrics, such as attempt and operation counts, are correctly recorded for various Spanner operations (including batch DML, transaction retries, rollbacks, midstream resumptions, and partitioned reads/queries). There are no review comments, and I have no feedback to provide.

@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.40%. Comparing base (4084332) to head (fc8424e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6505   +/-   ##
=======================================
  Coverage   96.39%   96.40%           
=======================================
  Files         301      301           
  Lines       84762    84762           
=======================================
+ Hits        81710    81716    +6     
+ Misses       3052     3046    -6     

☔ 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: spanner Issues related to the Spanner API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant