Skip to content

Commit 3d60231

Browse files
committed
Make shutdown mock optional
1 parent abd98df commit 3d60231

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkTracerProviderMetricsTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import static io.opentelemetry.sdk.trace.SdkTracerMetrics.OTEL_SPAN_PARENT_ORIGIN;
1313
import static io.opentelemetry.sdk.trace.SdkTracerMetrics.OTEL_SPAN_SAMPLING_RESULT;
1414
import static org.mockito.ArgumentMatchers.any;
15+
import static org.mockito.Mockito.lenient;
1516
import static org.mockito.Mockito.when;
1617

1718
import io.opentelemetry.api.common.Attributes;
@@ -910,7 +911,7 @@ void batch() throws Exception {
910911
Attributes.of(
911912
OTEL_SPAN_SAMPLING_RESULT, "RECORD_AND_SAMPLE")))));
912913

913-
when(mockExporter.shutdown()).thenReturn(CompletableResultCode.ofSuccess());
914+
lenient().when(mockExporter.shutdown()).thenReturn(CompletableResultCode.ofSuccess());
914915
processor.shutdown();
915916
}
916917

0 commit comments

Comments
 (0)