Skip to content

test: add integration test for PostgreSQL source in Datastream to BigQuery#4039

Open
yonatandt wants to merge 1 commit into
mainfrom
datastream-bq-postgres-it
Open

test: add integration test for PostgreSQL source in Datastream to BigQuery#4039
yonatandt wants to merge 1 commit into
mainfrom
datastream-bq-postgres-it

Conversation

@yonatandt

Copy link
Copy Markdown

No description provided.

@yonatandt yonatandt self-assigned this Jul 19, 2026
@yonatandt
yonatandt requested a review from a team as a code owner July 19, 2026 12:32
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request expands the integration testing suite for the Datastream to BigQuery template by adding support for PostgreSQL. The changes include necessary dependency updates and refactoring of the test logic to accommodate PostgreSQL-specific resource management and source initialization, ensuring robust validation of the pipeline across multiple database sources.

Highlights

  • Integration Test Expansion: Added a new integration test case to verify the Datastream to BigQuery pipeline with a PostgreSQL source.
  • Dependency Management: Included the PostgreSQL JDBC driver in the project dependencies to support the new integration test.
  • Code Refactoring: Updated the integration test infrastructure to use Java switch expressions for cleaner resource management and source configuration across different database types.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@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 adds support for PostgreSQL integration testing in the Datastream to BigQuery template. This includes adding the PostgreSQL JDBC driver dependency, introducing a new integration test testDataStreamPostgresToBigQuery, and refactoring the test setup to support PostgreSQL using switch expressions. Feedback is provided regarding a potential issue with table name casing in PostgreSQL: unquoted table names are folded to lowercase, which will cause mismatches with case-sensitive BigQuery table IDs. A suggestion is provided to use lowercase table names when running tests with PostgreSQL.

@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.68%. Comparing base (2d76a99) to head (3516392).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4039      +/-   ##
============================================
- Coverage     55.70%   55.68%   -0.02%     
- Complexity     6774     7234     +460     
============================================
  Files          1125     1124       -1     
  Lines         68437    68447      +10     
  Branches       7719     7721       +2     
============================================
- Hits          38121    38114       -7     
- Misses        27844    27856      +12     
- Partials       2472     2477       +5     
Components Coverage Δ
spanner-templates 87.66% <ø> (-0.02%) ⬇️
spanner-import-export 68.56% <ø> (-0.16%) ⬇️
spanner-live-forward-migration 89.27% <ø> (-0.02%) ⬇️
spanner-live-reverse-replication 83.45% <ø> (-0.02%) ⬇️
spanner-bulk-migration 92.47% <ø> (-0.03%) ⬇️
gcs-spanner-dv 88.53% <ø> (-0.02%) ⬇️
see 26 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants