Skip to content

fix(bigquery-jdbc): ensure test uses unique dataset & cleans up#13587

Open
logachev wants to merge 3 commits into
mainfrom
kirl/fake_dataset_test
Open

fix(bigquery-jdbc): ensure test uses unique dataset & cleans up#13587
logachev wants to merge 3 commits into
mainfrom
kirl/fake_dataset_test

Conversation

@logachev

Copy link
Copy Markdown
Contributor

testDestinationTableAndDestinationDatasetThatDoesNotExistsCreates was always using the same dataset. The moment this dataset was created in EU & likely failed to cleanup broke the test.

@logachev logachev requested review from a team as code owners June 30, 2026 00:53

@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 introduces a helper method getUniqueDatasetName to generate unique dataset names for integration tests and refactors testDestinationTableAndDestinationDatasetThatDoesNotExistsCreates to use this helper, wrap the connection in a try-with-resources block, and ensure cleanup occurs in a finally block. Feedback includes removing a redundant unary plus operator in the helper method and using DROP SCHEMA IF EXISTS in the cleanup block to avoid masking test failures if the dataset was never created.

Comment thread java-bigquery-jdbc/src/test/java/com/google/cloud/bigquery/jdbc/it/ITBase.java Outdated
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.

3 participants