Skip to content

Commit 05692c2

Browse files
committed
test(bigquery): warm up client in beforeClass to stabilize testFastSQLQueryMultiPage
b/467064659
1 parent 07f026f commit 05692c2

1 file changed

Lines changed: 4 additions & 1 deletion

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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,6 +1184,9 @@ static void beforeClass() throws InterruptedException, IOException {
11841184
Job jobLargeTable = bigquery.create(JobInfo.of(configurationLargeTable));
11851185
jobLargeTable = jobLargeTable.waitFor();
11861186
assertNull(jobLargeTable.getStatus().getError());
1187+
1188+
// Warmup query to initialize connection and avoid cold start timeout in subsequent tests
1189+
bigquery.query(QueryJobConfiguration.of("SELECT 1"));
11871190
}
11881191

11891192
@AfterAll
@@ -4853,7 +4856,7 @@ void testFastSQLQueryMultiPage() throws InterruptedException {
48534856
assertNotNull(result1.getNextPageToken());
48544857
assertTrue(result1.hasNextPage());
48554858

4856-
config.toBuilder().setQuery(query).build();
4859+
config = config.toBuilder().setQuery(query).build();
48574860
TableResult result2 = bigquery.query(config);
48584861
assertNotNull(result2.getJobId());
48594862
assertEquals(LARGE_TABLE_SCHEMA, result2.getSchema());

0 commit comments

Comments
 (0)