Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit e1fadc8

Browse files
committed
feat: Migrate tests to JUnit5
1 parent a20a1eb commit e1fadc8

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

google-cloud-bigquery/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@
166166
<artifactId>junit-jupiter-api</artifactId>
167167
<scope>test</scope>
168168
</dependency>
169+
<dependency>
170+
<groupId>org.junit.jupiter</groupId>
171+
<artifactId>junit-jupiter-engine</artifactId>
172+
<scope>test</scope>
173+
</dependency>
169174
<dependency>
170175
<groupId>org.mockito</groupId>
171176
<artifactId>mockito-junit-jupiter</artifactId>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7187,8 +7187,8 @@ public void testStatelessQueries() throws InterruptedException {
71877187
// Ideally Stateless query will return queryId but in some cases it would return jobId instead
71887188
// of queryId based on the query complexity or other factors (job timeout configs).
71897189
assertTrue(
7190-
"Exactly one of jobId or queryId should be non-null",
7191-
(tableResult.getJobId() != null) ^ (tableResult.getQueryId() != null));
7190+
(tableResult.getJobId() != null) ^ (tableResult.getQueryId() != null),
7191+
"Exactly one of jobId or queryId should be non-null");
71927192

71937193
// Job creation takes over, no query id is created.
71947194
bigQuery.getOptions().setDefaultJobCreationMode(JobCreationMode.JOB_CREATION_REQUIRED);
@@ -7232,8 +7232,8 @@ public void testTableResultJobIdAndQueryId() throws InterruptedException {
72327232
// Ideally Stateless query will return queryId but in some cases it would return jobId instead
72337233
// of queryId based on the query complexity or other factors (job timeout configs).
72347234
assertTrue(
7235-
"Exactly one of jobId or queryId should be non-null",
7236-
(result.getJobId() != null) ^ (result.getQueryId() != null));
7235+
(result.getJobId() != null) ^ (result.getQueryId() != null),
7236+
"Exactly one of jobId or queryId should be non-null");
72377237

72387238
// Test scenario 2 by failing stateless check by setting job timeout.
72397239
QueryJobConfiguration configQueryWithJob =

0 commit comments

Comments
 (0)