File tree Expand file tree Collapse file tree
main/java/com/google/cloud/bigquery/jdbc
test/java/com/google/cloud/bigquery/jdbc/it Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,9 +206,7 @@ public static Logging createLoggingClient(
206206 }
207207
208208 public static void releaseSdk (OpenTelemetry openTelemetry ) {
209- if (openTelemetry == null
210- || openTelemetry == GlobalOpenTelemetry .get ()
211- || openTelemetry == OpenTelemetry .noop ()) {
209+ if (openTelemetry == null || openTelemetry == OpenTelemetry .noop ()) {
212210 return ;
213211 }
214212
Original file line number Diff line number Diff line change @@ -258,12 +258,7 @@ private String verifyAndFetchLogs(String connectionUuid) throws Exception {
258258 .setCredentials (credentials )
259259 .build ()
260260 .getService ()) {
261- String filter =
262- "logName:\" projects/"
263- + PROJECT_ID
264- + "/logs/com.google.cloud.bigquery\" AND labels.\" jdbc.connection_id\" =\" "
265- + connectionUuid
266- + "\" " ;
261+ String filter = "labels.\" jdbc.connection_id\" =\" " + connectionUuid + "\" " ;
267262
268263 List <LogEntry > entries = fetchLogsWithRetry (logging , filter );
269264 assertFalse (entries .isEmpty (), "Telemetry logs should be exported to GCP" );
@@ -306,8 +301,11 @@ private Trace verifyAndFetchTrace(String traceId) throws Exception {
306301
307302 private <T > T pollWithRetry (java .util .concurrent .Callable <T > task ) throws InterruptedException {
308303 int attempts = 0 ;
309- int maxAttempts = 20 ; // 20 attempts * 3000ms = 60 seconds max delay
310- long delayMs = 3000 ; // 3000ms linear polling
304+ int maxAttempts = 10 ;
305+ long delayMs = 10000 ;
306+
307+ // 10 second wait for GCP to ingest data
308+ Thread .sleep (10000 );
311309
312310 while (attempts < maxAttempts ) {
313311 attempts ++;
You can’t perform that action at this time.
0 commit comments