Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7889,7 +7889,14 @@ public void testOpenTelemetryTracingQuery() throws InterruptedException {
bigquery.getOptions().setDefaultJobCreationMode(JobCreationMode.JOB_CREATION_OPTIONAL);
TableResult tableResult = executeSimpleQuery(bigquery);
assertNotNull(tableResult.getQueryId());
assertNull(tableResult.getJobId());
// Safely handle the fallback where BigQuery decides to create a job anyway
if (tableResult.getJobCreationReason() != null) {
assertNotNull(tableResult.getJobId());
assertEquals(tableResult.getQueryId(), tableResult.getJobId().getJob());
assertEquals(JobCreationReason.Code.OTHER, tableResult.getJobCreationReason().getCode());
} else {
assertNull(tableResult.getJobId());
}

assertNotNull(OTEL_ATTRIBUTES.get("com.google.cloud.bigquery.BigQuery.queryRpc"));
assertNotNull(
Expand Down
Loading