Skip to content

test(bigquery-jdbc): make picosecond ITs timezone independent and disable on TPC - #14435

Open
keshavdandeva wants to merge 4 commits into
mainfrom
jdbc/fix-picosecond-test-kokoro
Open

keshavdandeva wants to merge 4 commits into
mainfrom
jdbc/fix-picosecond-test-kokoro

Conversation

@keshavdandeva

Copy link
Copy Markdown
Contributor

This PR fixes ITJdbcTimestampPicosTest failures in Kokoro

Changes

  • Time zone (integration_test_continuous, standalone_it_continuous)

Four assertions compared hardcoded UTC literals against getString() on plain
TIMESTAMP columns, which the driver renders in the JVM default time zone. The tests
only passed under a UTC JVM; the Kokoro VM runs America/New_York, giving the observed
12:34:56 vs 07:34:56 mismatch.

Added an atJvmZone() helper that converts the UTC literal to the JVM zone, mirroring
the existing pattern in ITBigQueryJDBCTest.validateGetString. TIMESTAMP(12)
assertions are unchanged. Those values are returned as verbatim UTC strings and are
already zone invariant.

  • TPC (tpc_integration_tests_continuous)

TPC backends reject the TIMESTAMP(12) type parameter, so @BeforeAll failed and the
whole class errored. Added a class-level @Tag("disable_tpc")

@keshavdandeva
keshavdandeva requested review from a team as code owners September 18, 2026 18:15

@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 updates the ITJdbcTimestampPicosTest class by introducing a helper method, atJvmZone, to convert and format UTC timestamp literals into the JVM's default time zone, which fixes zone-dependent assertion failures. Additionally, the test class is tagged with @tag("disable_tpc"). The review feedback suggests optimizing the helper method by defining the DateTimeFormatter as a private static final constant to prevent redundant object allocations.

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.

2 participants