Skip to content

Commit d581169

Browse files
committed
gcp-obsrevability : Fixed the slowness issue for GcpObservabilityTest.enableObservability test case.
1 parent 5e8abc6 commit d581169

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

gcp-observability/src/test/java/io/grpc/gcp/observability/GcpObservabilityTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,12 @@ public void run() {
196196
mock(InternalLoggingServerInterceptor.Factory.class);
197197
when(serverInterceptorFactory.create()).thenReturn(serverInterceptor);
198198

199-
try (GcpObservability unused =
200-
GcpObservability.grpcInit(
201-
sink, config, channelInterceptorFactory, serverInterceptorFactory)) {
199+
try {
200+
GcpObservability gcpObservability = GcpObservability.grpcInit(
201+
sink, config, channelInterceptorFactory, serverInterceptorFactory);
202+
// Added the assert statement to fix the PR build/check warnings for
203+
// unused variable gcpObservability.
204+
assertThat(gcpObservability).isNotNull();
202205
List<?> configurators = InternalConfiguratorRegistry.getConfigurators();
203206
assertThat(configurators).hasSize(1);
204207
ObservabilityConfigurator configurator = (ObservabilityConfigurator) configurators.get(0);

0 commit comments

Comments
 (0)