Fix compile failure

This commit is contained in:
Larry Safran 2024-02-15 20:07:29 -08:00 committed by Eric Anderson
parent eba699ad16
commit 67dfe49ae6
1 changed files with 16 additions and 3 deletions

View File

@ -337,14 +337,27 @@ public class MultiChildLoadBalancerTest {
} }
private class TestLb extends MultiChildLoadBalancer { private class TestLb extends MultiChildLoadBalancer {
protected TestLb(Helper mockHelper) { protected TestLb(Helper mockHelper) {
super(mockHelper); super(mockHelper);
} }
@Override @Override
protected SubchannelPicker getSubchannelPicker(Map<Object, SubchannelPicker> childPickers) { protected void updateOverallBalancingState() {
return new TestSubchannelPicker(childPickers); ConnectivityState overallState = null;
final Map<Object, SubchannelPicker> childPickers = new HashMap<>();
for (ChildLbState childLbState : getChildLbStates()) {
if (childLbState.isDeactivated()) {
continue;
}
childPickers.put(childLbState.getKey(), childLbState.getCurrentPicker());
overallState = aggregateState(overallState, childLbState.getCurrentState());
}
if (overallState != null) {
getHelper().updateBalancingState(overallState, new TestSubchannelPicker(childPickers));
currentConnectivityState = overallState;
}
} }
private class TestSubchannelPicker extends SubchannelPicker { private class TestSubchannelPicker extends SubchannelPicker {