use of io.grpc.LoadBalancerProvider in project grpc-java by grpc.
the class GracefulSwitchLoadBalancerTest method setUp.
@Before
public void setUp() {
for (String lbPolicy : lbPolicies) {
LoadBalancerProvider lbProvider = new FakeLoadBalancerProvider(lbPolicy);
lbProviders.put(lbPolicy, lbProvider);
lbRegistry.register(lbProvider);
}
}
use of io.grpc.LoadBalancerProvider in project grpc-java by grpc.
the class ClusterImplLoadBalancerProviderTest method provided.
@Test
public void provided() {
LoadBalancerProvider provider = LoadBalancerRegistry.getDefaultRegistry().getProvider(XdsLbPolicies.CLUSTER_IMPL_POLICY_NAME);
assertThat(provider).isInstanceOf(ClusterImplLoadBalancerProvider.class);
}
use of io.grpc.LoadBalancerProvider in project grpc-java by grpc.
the class ClusterImplLoadBalancerProviderTest method providesLoadBalancer.
@Test
public void providesLoadBalancer() {
Helper helper = mock(Helper.class);
when(helper.getAuthority()).thenReturn("api.google.com");
LoadBalancerProvider provider = new ClusterImplLoadBalancerProvider();
LoadBalancer loadBalancer = provider.newLoadBalancer(helper);
assertThat(loadBalancer).isInstanceOf(ClusterImplLoadBalancer.class);
}
use of io.grpc.LoadBalancerProvider in project grpc-java by grpc.
the class ClusterManagerLoadBalancerProviderTest method registered.
@Test
public void registered() {
LoadBalancerProvider provider = LoadBalancerRegistry.getDefaultRegistry().getProvider("cluster_manager_experimental");
assertThat(provider).isInstanceOf(ClusterManagerLoadBalancerProvider.class);
}
use of io.grpc.LoadBalancerProvider in project grpc-java by grpc.
the class ClusterResolverLoadBalancerProviderTest method provided.
@Test
public void provided() {
LoadBalancerProvider provider = LoadBalancerRegistry.getDefaultRegistry().getProvider(XdsLbPolicies.CLUSTER_RESOLVER_POLICY_NAME);
assertThat(provider).isInstanceOf(ClusterResolverLoadBalancerProvider.class);
}
Aggregations