Skip to content

Commit

Permalink
update test to be more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Apr 18, 2023
1 parent b452e3e commit 1f11f40
Showing 1 changed file with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,13 @@ public void sendMessage(ReqT message) {
final ApiFunction<ManagedChannelBuilder, ManagedChannelBuilder> oldConfigurator =
channelProvider.getChannelConfigurator();

@SuppressWarnings("rawtypes")
final ApiFunction<ManagedChannelBuilder, ManagedChannelBuilder> newConfigurator =
new ApiFunction<ManagedChannelBuilder, ManagedChannelBuilder>() {
@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();
Expand Down

0 comments on commit 1f11f40

Please sign in to comment.