File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
java-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/spi/v2 Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,9 @@ private void verifySpan(
160160 assertEquals (
161161 gcpResourceDestinationId ,
162162 rpcSpan .getAttributes ().get (BigQueryTelemetryTracer .GCP_RESOURCE_DESTINATION_ID ));
163+
164+ // this attribute should never get set in a normal success flow
165+ assertNull (rpcSpan .getAttributes ().get (BigQueryTelemetryTracer .HTTP_REQUEST_RESEND_COUNT ));
163166 }
164167
165168 private void verifySpanProductionAttributes (
@@ -1168,12 +1171,7 @@ public void testResendCountOnRetry() throws Exception {
11681171 .orElse (null );
11691172 assertNotNull (rpcSpan );
11701173 assertEquals (
1171- 2L ,
1172- rpcSpan
1173- .getAttributes ()
1174- .get (
1175- BigQueryTelemetryTracer
1176- .HTTP_REQUEST_RESEND_COUNT ));
1174+ 2L , rpcSpan .getAttributes ().get (BigQueryTelemetryTracer .HTTP_REQUEST_RESEND_COUNT ));
11771175 } finally {
11781176 com .google .cloud .bigquery .BigQueryRetryAlgorithm .setCurrentAttempt (0 );
11791177 }
@@ -1308,12 +1306,7 @@ public void testResendCountNotSetWhenDisabled() throws Exception {
13081306 .findFirst ()
13091307 .orElse (null );
13101308 assertNotNull (rpcSpan );
1311- assertNull (
1312- rpcSpan
1313- .getAttributes ()
1314- .get (
1315- BigQueryTelemetryTracer
1316- .HTTP_REQUEST_RESEND_COUNT ));
1309+ assertNull (rpcSpan .getAttributes ().get (BigQueryTelemetryTracer .HTTP_REQUEST_RESEND_COUNT ));
13171310 } finally {
13181311 com .google .cloud .bigquery .BigQueryRetryAlgorithm .setCurrentAttempt (0 );
13191312 }
You can’t perform that action at this time.
0 commit comments