use of io.grpc.internal.ManagedChannelImplBuilder.UnsupportedClientTransportFactoryBuilder in project grpc-java by grpc.
the class ServiceConfigErrorHandlingTest method setUp.
@Before
public void setUp() throws Exception {
when(mockLoadBalancer.canHandleEmptyAddressListFromNameResolution()).thenCallRealMethod();
LoadBalancerRegistry.getDefaultRegistry().register(mockLoadBalancerProvider);
expectedUri = new URI(TARGET);
when(mockTransportFactory.getScheduledExecutorService()).thenReturn(timer.getScheduledExecutorService());
when(executorPool.getObject()).thenReturn(executor.getScheduledExecutorService());
channelBuilder = new ManagedChannelImplBuilder(TARGET, new UnsupportedClientTransportFactoryBuilder(), new FixedPortProvider(DEFAULT_PORT));
channelBuilder.nameResolverFactory(new FakeNameResolverFactory.Builder(expectedUri).build()).defaultLoadBalancingPolicy(MOCK_POLICY_NAME).userAgent(USER_AGENT).idleTimeout(ManagedChannelImplBuilder.IDLE_MODE_MAX_TIMEOUT_DAYS, TimeUnit.DAYS).offloadExecutor(blockingExecutor);
channelBuilder.executorPool = executorPool;
channelBuilder.binlog = null;
channelBuilder.channelz = channelz;
}
Aggregations