Commit 8b7d6848 by Bertrand Renuart Committed by Spencer Gibb

use `com.netflix.loadbalancer.DummyPing` instead of `NoopPing`

use `com.netflix.loadbalancer.DummyPing` instead of `NoopPing` This eliminates the startup of another theadpool. fixes gh-1504
parent edb14e2a
......@@ -40,11 +40,11 @@ import com.netflix.client.RetryHandler;
import com.netflix.client.config.DefaultClientConfigImpl;
import com.netflix.client.config.IClientConfig;
import com.netflix.loadbalancer.ConfigurationBasedServerList;
import com.netflix.loadbalancer.DummyPing;
import com.netflix.loadbalancer.ILoadBalancer;
import com.netflix.loadbalancer.IPing;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.LoadBalancerBuilder;
import com.netflix.loadbalancer.NoOpPing;
import com.netflix.loadbalancer.Server;
import com.netflix.loadbalancer.ServerList;
import com.netflix.loadbalancer.ServerListFilter;
......@@ -101,7 +101,7 @@ public class RibbonClientConfiguration {
if (this.propertiesFactory.isSet(IPing.class, name)) {
return this.propertiesFactory.get(IPing.class, config, name);
}
return new NoOpPing();
return new DummyPing();
}
@Bean
......
......@@ -29,7 +29,7 @@ import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.netflix.loadbalancer.ConfigurationBasedServerList;
import com.netflix.loadbalancer.NoOpPing;
import com.netflix.loadbalancer.DummyPing;
import com.netflix.loadbalancer.Server;
import com.netflix.loadbalancer.ZoneAvoidanceRule;
import com.netflix.loadbalancer.ZoneAwareLoadBalancer;
......@@ -56,8 +56,8 @@ public class RibbonClientPreprocessorIntegrationTests {
}
@Test
public void pingDefaultsToNoOp() throws Exception {
NoOpPing.class.cast(getLoadBalancer().getPing());
public void pingDefaultsToDummy() throws Exception {
DummyPing.class.cast(getLoadBalancer().getPing());
}
@Test
......
......@@ -69,9 +69,9 @@ public class RibbonClientPreprocessorPropertiesOverridesIntegrationTests {
}
@Test
public void pingOverridesToDummy() throws Exception {
DummyPing.class.cast(getLoadBalancer("foo2").getPing());
NoOpPing.class.cast(getLoadBalancer("bar").getPing());
public void pingOverridesToNoOp() throws Exception {
NoOpPing.class.cast(getLoadBalancer("foo2").getPing());
DummyPing.class.cast(getLoadBalancer("bar").getPing());
}
@Test
......
......@@ -29,7 +29,7 @@ foo:
# for RibbonClientPreprocessorPropertiesOverridesIntegrationTests
foo2:
ribbon:
NFLoadBalancerPingClassName: com.netflix.loadbalancer.DummyPing
NFLoadBalancerPingClassName: com.netflix.loadbalancer.NoOpPing
NFLoadBalancerRuleClassName: com.netflix.loadbalancer.RandomRule
NIWSServerListClassName: org.springframework.cloud.netflix.ribbon.test.TestServerList
NIWSServerListFilterClassName: com.netflix.loadbalancer.ServerListSubsetFilter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment