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

Commit 378182b

Browse files
committed
docs: add comment explaining stateless query fallback behavior in testTableResultJobIdAndQueryId()
1 parent dfc7e2b commit 378182b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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
@@ -7182,7 +7182,8 @@ public void testStatelessQueries() throws InterruptedException {
71827182
bigQuery.getOptions().setDefaultJobCreationMode(JobCreationMode.JOB_CREATION_OPTIONAL);
71837183
TableResult tableResult = executeSimpleQuery(bigQuery);
71847184
// Use XOR: We accept EITHER a QueryId (fast path) OR a JobId (slow fallback), but not both.
7185-
// Ideally Stateless query will return queryId but in some cases it would return jobId instead of queryId based on the query complexity or other factors (job timeout configs).
7185+
// Ideally Stateless query will return queryId but in some cases it would return jobId instead
7186+
// of queryId based on the query complexity or other factors (job timeout configs).
71867187
assertTrue(
71877188
"Exactly one of jobId or queryId should be non-null",
71887189
(tableResult.getJobId() != null) ^ (tableResult.getQueryId() != null));
@@ -7226,6 +7227,8 @@ public void testTableResultJobIdAndQueryId() throws InterruptedException {
72267227
// A stateless query should result in either a queryId (stateless success) or a jobId (fallback
72277228
// to a job).
72287229
// Exactly one of them should be non-null.
7230+
// Ideally Stateless query will return queryId but in some cases it would return jobId instead
7231+
// of queryId based on the query complexity or other factors (job timeout configs).
72297232
assertTrue(
72307233
"Exactly one of jobId or queryId should be non-null",
72317234
(result.getJobId() != null) ^ (result.getQueryId() != null));

0 commit comments

Comments
 (0)