Skip to content

Commit

Permalink
Fix integ tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
zpinto committed Oct 27, 2023
1 parent d3887bd commit 4ca8f26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public class AssignableNode implements Comparable<AssignableNode> {
AssignableNode(ClusterConfig clusterConfig, ClusterTopologyConfig clusterTopologyConfig,
InstanceConfig instanceConfig, String instanceName) {
_instanceName = instanceName;
_logicaId =
clusterTopologyConfig != null ? instanceConfig.getLogicalId(clusterTopologyConfig.getEndNodeType())
_logicaId = clusterTopologyConfig != null ? instanceConfig.getLogicalId(
clusterTopologyConfig.getEndNodeType())
: instanceName;
Map<String, Integer> instanceCapacity = fetchInstanceCapacity(clusterConfig, instanceConfig);
_faultZone = computeFaultZone(clusterConfig, instanceConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
Expand Down Expand Up @@ -738,7 +739,8 @@ public void testRebalanceOverwrite() throws HelixRebalanceException, IOException
instances.add(offlineInstance);
when(clusterData.getAllInstances()).thenReturn(instances);
when(clusterData.getEnabledInstances()).thenReturn(instances);
when(clusterData.getEnabledLiveInstances()).thenReturn(new HashSet<>(Set.of(instance0, instance1, instance2)));
when(clusterData.getEnabledLiveInstances()).thenReturn(
new HashSet<>(Arrays.asList(instance0, instance1, instance2)));
Map<String, Long> instanceOfflineTimeMap = new HashMap<>();
instanceOfflineTimeMap.put(offlineInstance, System.currentTimeMillis() + Integer.MAX_VALUE);
when(clusterData.getInstanceOfflineTimeMap()).thenReturn(instanceOfflineTimeMap);
Expand Down

0 comments on commit 4ca8f26

Please sign in to comment.