From 58c53fe51ddc3795193c02067242de9707b7a9be Mon Sep 17 00:00:00 2001 From: Mattie Fu Date: Tue, 18 Apr 2023 10:31:05 -0400 Subject: [PATCH] update test --- .../stub/metrics/BuiltinMetricsTracerTest.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java index 5f06baa0ff..bd48b463bd 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java @@ -221,19 +221,13 @@ public void sendMessage(ReqT message) { final ApiFunction oldConfigurator = channelProvider.getChannelConfigurator(); - @SuppressWarnings("rawtypes") - final ApiFunction newConfigurator = - new ApiFunction() { - @Override - @SuppressWarnings("rawtypes") - public ManagedChannelBuilder apply(ManagedChannelBuilder builder) { - if (oldConfigurator != null) { - builder = oldConfigurator.apply(builder); - } - return builder.intercept(clientInterceptor); + channelProvider.setChannelConfigurator( + (builder) -> { + if (oldConfigurator != null) { + builder = oldConfigurator.apply(builder); } - }; - channelProvider.setChannelConfigurator(newConfigurator); + return builder.intercept(clientInterceptor); + }); stubSettingsBuilder.setTransportChannelProvider(channelProvider.build()); EnhancedBigtableStubSettings stubSettings = stubSettingsBuilder.build();