Skip to content

Commit 39a4b5c

Browse files
committed
test(bigquery): use shared BigQuery instance in Arrow integration tests
1 parent 1802442 commit 39a4b5c

1 file changed

Lines changed: 2 additions & 6 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: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7504,15 +7504,13 @@ void testQueryWithTimeout() throws InterruptedException {
75047504

75057505
@Test
75067506
void testQueryResultsFormatArrow() throws InterruptedException {
7507-
RemoteBigQueryHelper bigqueryHelper = RemoteBigQueryHelper.create();
7508-
BigQuery bigQuery = bigqueryHelper.getOptions().getService();
75097507
String query = "SELECT 1 as id, 'hello' as name, TIMESTAMP('2026-08-10T12:00:00Z') as ts";
75107508
QueryJobConfiguration config =
75117509
QueryJobConfiguration.newBuilder(query)
75127510
.setQueryResultsFormat(QueryResultsFormat.ARROW)
75137511
.setJobCreationMode(JobCreationMode.JOB_CREATION_OPTIONAL)
75147512
.build();
7515-
try (ArrowQueryResult result = bigQuery.queryArrow(config)) {
7513+
try (ArrowQueryResult result = bigquery.queryArrow(config)) {
75167514
assertNotNull(result);
75177515
int batchCount = 0;
75187516
long totalRows = 0;
@@ -7528,15 +7526,13 @@ void testQueryResultsFormatArrow() throws InterruptedException {
75287526

75297527
@Test
75307528
void testQueryResultsFormatArrowMultiPage() throws InterruptedException {
7531-
RemoteBigQueryHelper bigqueryHelper = RemoteBigQueryHelper.create();
7532-
BigQuery bigQuery = bigqueryHelper.getOptions().getService();
75337529
String query = "SELECT x FROM UNNEST(GENERATE_ARRAY(1, 15000)) AS x";
75347530
QueryJobConfiguration config =
75357531
QueryJobConfiguration.newBuilder(query)
75367532
.setQueryResultsFormat(QueryResultsFormat.ARROW)
75377533
.setJobCreationMode(JobCreationMode.JOB_CREATION_OPTIONAL)
75387534
.build();
7539-
try (ArrowQueryResult result = bigQuery.queryArrow(config)) {
7535+
try (ArrowQueryResult result = bigquery.queryArrow(config)) {
75407536
assertNotNull(result);
75417537
long totalRows = 0;
75427538
for (VectorSchemaRoot root : result) {

0 commit comments

Comments
 (0)