File tree Expand file tree Collapse file tree
src/test/java/com/google/cloud/bigquery/jdbc/it Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5050 <skip >${skipSurefire} </skip >
5151 <systemPropertyVariables >
5252 <JDBC_TESTS >true</JDBC_TESTS >
53+ <java .net.preferIPv4Stack>true</java .net.preferIPv4Stack>
5354 </systemPropertyVariables >
5455 </configuration >
5556 </plugin >
5960 <configuration >
6061 <systemPropertyVariables >
6162 <JDBC_TESTS >true</JDBC_TESTS >
63+ <java .net.preferIPv4Stack>true</java .net.preferIPv4Stack>
6264 </systemPropertyVariables >
6365 </configuration >
6466 <dependencies >
Original file line number Diff line number Diff line change @@ -263,9 +263,15 @@ private String verifyAndFetchLogs(String connectionUuid) throws Exception {
263263 List <LogEntry > entries = fetchLogsWithRetry (logging , filter );
264264 assertFalse (entries .isEmpty (), "Telemetry logs should be exported to GCP" );
265265
266- LogEntry sampleEntry = entries .get (0 );
267- String traceId = sampleEntry .getTrace ();
268- String hexSpanId = sampleEntry .getSpanId ();
266+ String traceId = null ;
267+ String hexSpanId = null ;
268+ for (LogEntry entry : entries ) {
269+ if (entry .getTrace () != null ) {
270+ traceId = entry .getTrace ();
271+ hexSpanId = entry .getSpanId ();
272+ break ;
273+ }
274+ }
269275
270276 assertNotNull (traceId , "Log entry must contain TraceId" );
271277 assertNotNull (hexSpanId , "Log entry must contain SpanId" );
You can’t perform that action at this time.
0 commit comments