use of com.netflix.client.PrimeConnections.PrimeConnectionEndStats in project ribbon by Netflix.
the class PrimeConnectionsTest method testPrimeConnectionsSmallPool.
@Test
public void testPrimeConnectionsSmallPool() throws Exception {
Configuration config = ConfigurationManager.getConfigInstance();
config.setProperty("PrimeConnectionsTest1.ribbon.NFLoadBalancerClassName", com.netflix.loadbalancer.DynamicServerListLoadBalancer.class.getName());
config.setProperty("PrimeConnectionsTest1.ribbon.NIWSServerListClassName", SmallFixedServerList.class.getName());
config.setProperty("PrimeConnectionsTest1.ribbon.EnablePrimeConnections", "true");
DynamicServerListLoadBalancer<Server> lb = (DynamicServerListLoadBalancer<Server>) ClientFactory.getNamedLoadBalancer("PrimeConnectionsTest1");
PrimeConnectionEndStats stats = lb.getPrimeConnections().getEndStats();
assertEquals(stats.success, SMALL_FIXED_SERVER_LIST_SIZE);
}
use of com.netflix.client.PrimeConnections.PrimeConnectionEndStats in project ribbon by Netflix.
the class PrimeConnectionsTest method testPrimeConnectionsLargePool.
@Test
public void testPrimeConnectionsLargePool() throws Exception {
Configuration config = ConfigurationManager.getConfigInstance();
config.setProperty("PrimeConnectionsTest2.ribbon.NFLoadBalancerClassName", com.netflix.loadbalancer.DynamicServerListLoadBalancer.class.getName());
config.setProperty("PrimeConnectionsTest2.ribbon.NIWSServerListClassName", LargeFixedServerList.class.getName());
config.setProperty("PrimeConnectionsTest2.ribbon.EnablePrimeConnections", "true");
DynamicServerListLoadBalancer<Server> lb = (DynamicServerListLoadBalancer<Server>) ClientFactory.getNamedLoadBalancer("PrimeConnectionsTest2");
PrimeConnectionEndStats stats = lb.getPrimeConnections().getEndStats();
assertEquals(stats.success, LARGE_FIXED_SERVER_LIST_SIZE);
}
Aggregations