Skip to content

cleanup(bigquery): centralize test helpers - #6730

Merged
dbolduc merged 1 commit into
googleapis:mainfrom
dbolduc:cleanup--bigquery-centralize-test-helpers
Sep 8, 2026
Merged

cleanup(bigquery): centralize test helpers#6730
dbolduc merged 1 commit into
googleapis:mainfrom
dbolduc:cleanup--bigquery-centralize-test-helpers

Conversation

@dbolduc

@dbolduc dbolduc commented Sep 8, 2026

Copy link
Copy Markdown
Member

We have a bunch of test helpers defined at wherever I first needed them. Move them all to a centralized mod test, so they are easier to find.

@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the BigQuery API. label Sep 8, 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 BigQuery write client's unit tests by consolidating common test helper functions—such as 'write_stream', 'schema', 'test_transport', 'convert', 'test_request', and 'test_response'—into a new dedicated test helper module ('src/bigquery/src/write/test.rs'). Duplicate helper definitions across various test modules have been removed and replaced with imports from the new module, reducing boilerplate and improving maintainability. I have no feedback to provide as the changes are clean and idiomatic.

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.71%. Comparing base (9797b2d) to head (c7c7c6e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6730      +/-   ##
==========================================
- Coverage   96.71%   96.71%   -0.01%     
==========================================
  Files         313      314       +1     
  Lines      101324   101293      -31     
==========================================
- Hits        98000    97965      -35     
- Misses       3324     3328       +4     

☔ 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.

@dbolduc
dbolduc marked this pull request as ready for review September 8, 2026 06:02
@dbolduc
dbolduc requested a review from a team as a code owner September 8, 2026 06:02
@dbolduc
dbolduc enabled auto-merge (squash) September 8, 2026 06:02
@dbolduc
dbolduc merged commit 8298358 into googleapis:main Sep 8, 2026
42 checks passed
@dbolduc
dbolduc deleted the cleanup--bigquery-centralize-test-helpers branch September 8, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants