Search in sources :

Example 6 with UnsupportedClientTransportFactoryBuilder

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;
}
Also used : FixedPortProvider(io.grpc.internal.ManagedChannelImplBuilder.FixedPortProvider) UnsupportedClientTransportFactoryBuilder(io.grpc.internal.ManagedChannelImplBuilder.UnsupportedClientTransportFactoryBuilder) URI(java.net.URI) UnsupportedClientTransportFactoryBuilder(io.grpc.internal.ManagedChannelImplBuilder.UnsupportedClientTransportFactoryBuilder) Before(org.junit.Before)

Aggregations

UnsupportedClientTransportFactoryBuilder (io.grpc.internal.ManagedChannelImplBuilder.UnsupportedClientTransportFactoryBuilder)6 FixedPortProvider (io.grpc.internal.ManagedChannelImplBuilder.FixedPortProvider)4 Helper (io.grpc.LoadBalancer.Helper)3 PickSubchannelArgs (io.grpc.LoadBalancer.PickSubchannelArgs)3 URI (java.net.URI)3 Before (org.junit.Before)3 Test (org.junit.Test)3 CallOptions (io.grpc.CallOptions)2 ClientStreamTracer (io.grpc.ClientStreamTracer)2 Subchannel (io.grpc.LoadBalancer.Subchannel)2 SubchannelPicker (io.grpc.LoadBalancer.SubchannelPicker)2 ManagedChannel (io.grpc.ManagedChannel)2 Metadata (io.grpc.Metadata)2 MockClientTransportInfo (io.grpc.internal.TestUtils.MockClientTransportInfo)2 ForwardingSubchannel (io.grpc.util.ForwardingSubchannel)2 ChannelCredentials (io.grpc.ChannelCredentials)1 ChannelLogger (io.grpc.ChannelLogger)1 ClientInterceptor (io.grpc.ClientInterceptor)1 CompositeChannelCredentials (io.grpc.CompositeChannelCredentials)1 EquivalentAddressGroup (io.grpc.EquivalentAddressGroup)1