You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
loadbalancer-experimental: Unify the Host.weight() methods (#3146)
Motivation:
We have a few Host related weight methods, but they have slightly
different names. Worse yet, we don't use them properly when
adjusting weights.
Modifications:
Rename the LoadBalancerObserver.Host.loadBalancingWeight() to
simply .weight()
Copy file name to clipboardexpand all lines: servicetalk-loadbalancer-experimental/src/main/java/io/servicetalk/loadbalancer/DefaultHostPriorityStrategy.java
Copy file name to clipboardexpand all lines: servicetalk-loadbalancer-experimental/src/test/java/io/servicetalk/loadbalancer/DefaultHostPriorityStrategyTest.java
+10-10
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ void noPriorities() {
47
47
voidnoPrioritiesWithWeights() {
48
48
List<TestPrioritizedHost> hosts = makeHosts(4);
49
49
for (inti = 0; i < hosts.size(); i++) {
50
-
hosts.get(i).loadBalancingWeight(i + 1d);
50
+
hosts.get(i).weight(i + 1d);
51
51
}
52
52
List<TestPrioritizedHost> result = hostPriorityStrategy.prioritize(hosts);
Copy file name to clipboardexpand all lines: servicetalk-loadbalancer-experimental/src/test/java/io/servicetalk/loadbalancer/DefaultLoadBalancerTest.java
0 commit comments