Skip to content

Commit 31a3187

Browse files
Update java-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent df5c663 commit 31a3187

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • java-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it

java-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,17 +1219,17 @@ static GoogleCredentials loadCredentials(String credentialFile) {
12191219
void testLosslessMaxTimestampIntegration() throws InterruptedException {
12201220
// 1. Initialize BigQueryOptions with the lossless timestamp flag enabled
12211221
// We use RemoteBigQueryHelper to get standard test environment credentials
1222-
BigQueryOptions options = RemoteBigQueryHelper.create().getOptions().toBuilder()
1222+
BigQueryOptions options = bigquery.getOptions().toBuilder()
12231223
.setUseInt64Timestamps(true)
12241224
.build();
1225-
BigQuery bigquery = options.getService();
1225+
BigQuery losslessBigQuery = options.getService();
12261226

12271227
// 2. Query the absolute maximum timestamp directly from BigQuery
12281228
String query = "SELECT TIMESTAMP '9999-12-31 23:59:59.999999 UTC' as max_ts";
12291229
QueryJobConfiguration config = QueryJobConfiguration.newBuilder(query).build();
12301230

12311231
// 3. Execute the query
1232-
TableResult result = bigquery.query(config);
1232+
TableResult result = losslessBigQuery.query(config);
12331233

12341234
// 4. Verify that the parsed value exactly matches the 64-bit microsecond value without rounding
12351235
for (FieldValueList row : result.iterateAll()) {

0 commit comments

Comments
 (0)