test(bigquery-jdbc): add IT for PCNT metadata and DefaultDataset delimiters - #14210
test(bigquery-jdbc): add IT for PCNT metadata and DefaultDataset delimiters#14210keshavdandeva wants to merge 8 commits into
Conversation
…ultDataset delimiters
There was a problem hiding this comment.
Code Review
This pull request introduces integration tests to verify connection URL parsing with different delimiters (colon and dot) for default datasets, including three-tier namespaces (PCNT). It also adds tests for database metadata retrieval (schemas, tables, and columns) under the PCNT schema. The review feedback suggests removing a redundant null check on the ResultSet in ITConnectionTest in favor of a more robust assertion, and optimizing ITDatabaseMetadataTest by extracting repeated ResultSet lookups into a local variable.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds integration tests to verify default dataset configurations with colon and dot delimiters, as well as 3-tier namespace (PCNT) support in ITConnectionTest and ITDatabaseMetadataTest. The review feedback suggests extracting duplicated schema and table name constants into a dedicated utility class to prevent tight coupling and duplication across test classes.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds integration tests for BigQuery JDBC connections and database metadata, covering default dataset delimiters and 3-tier namespaces (PCNT). It also refactors PCNT constants into ITBase for shared use. The review feedback correctly identifies that the new tests use JUnit 5 style assertions (with the message as the last argument) instead of JUnit 4 style (with the message as the first argument), which will cause compilation errors in this codebase.
b/554045509
This PR introduces integration test coverage for PCNT (Project-Catalog-Namespace-Table) metadata and
DefaultDatasetconfigurations to support multi-driver verification across standard GCP and TPC environments.Instead of asserting against static pre-existing tables, these integration tests dynamically provision and tear down isolated PCNT test tables per test class, ensuring self-contained and reproducible test execution.
Changes
1.
ITBase.javaPCNT_SCHEMAwith fallback to"bq-drivers-test-warehouse.jdbc_pcnt_test_namespace"and environment variable override support for custom TPC environments.setUpPcntTable()andcleanUpPcntTable()to create isolated PCNT tables with sample data (id,name) and safely drop them during teardown.2.
ITConnectionTest.javaPCNT_CONN_TEST_TABLE_<rand>in@BeforeAll/@AfterAll.testDefaultDatasetColonDelimiter(): Tests 2-tier colon syntax (DefaultDataset=project:dataset) and verifies unqualified query execution against default dataset tables.testPcntDefaultDataset2TierNamespace(): Tests 2-tier Lakehouse namespace syntax (DefaultDataset=warehouse.namespace) and executes unqualified queries against PCNT tables.testPcntDefaultDataset3TierNamespace(): Tests 3-tier PCNT syntax (DefaultDataset=project:warehouse.namespace) and executes unqualified queries against PCNT tables.3.
ITDatabaseMetadataTest.javaPCNT_METADATA_TEST_TABLE_<rand>in@BeforeAll/@AfterAll.testDatabaseMetadataGetSchemasPcnt(): VerifiesDatabaseMetaData.getSchemas()accurately enumerates PCNT schema namespaces with correctTABLE_SCHEMandTABLE_CATALOG.testDatabaseMetadataGetTablesPcnt(): VerifiesDatabaseMetaData.getTables()discovers dynamic PCNT tables with table typeTABLE.testDatabaseMetadataGetColumnsPcnt(): VerifiesDatabaseMetaData.getColumns()accurately extracts column metadata (id,name), types, and ordinal positions.