fix weight lb ut (#705)

pull/707/head
lepdou 3 years ago committed by GitHub
parent 57418849ed
commit 0eea850c3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -80,6 +80,7 @@ public class PolarisLoadBalancerTest {
//mock routerAPI for rule //mock routerAPI for rule
when(routerAPI.processLoadBalance(any())).thenReturn(assembleProcessLoadBalanceResp()); when(routerAPI.processLoadBalance(any())).thenReturn(assembleProcessLoadBalanceResp());
PolarisWeightedRule rule = new PolarisWeightedRule(routerAPI); PolarisWeightedRule rule = new PolarisWeightedRule(routerAPI);
rule.initWithNiwsConfig(new DefaultClientConfigImpl());
// clientConfig // clientConfig
IClientConfig config = new DefaultClientConfigImpl(); IClientConfig config = new DefaultClientConfigImpl();
@ -111,6 +112,7 @@ public class PolarisLoadBalancerTest {
//mock routerAPI for rule //mock routerAPI for rule
when(routerAPI.processLoadBalance(any())).thenReturn(assembleProcessLoadBalanceResp()); when(routerAPI.processLoadBalance(any())).thenReturn(assembleProcessLoadBalanceResp());
PolarisWeightedRule rule = new PolarisWeightedRule(routerAPI); PolarisWeightedRule rule = new PolarisWeightedRule(routerAPI);
rule.initWithNiwsConfig(new DefaultClientConfigImpl());
// clientConfig // clientConfig
IClientConfig config = new DefaultClientConfigImpl(); IClientConfig config = new DefaultClientConfigImpl();

Loading…
Cancel
Save