Skip to content

Commit

Permalink
fixing ut
Browse files Browse the repository at this point in the history
  • Loading branch information
JobseRyan committed Aug 28, 2024
1 parent c2d281a commit c3d21a4
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,13 @@ public void testResolveBootstrapInLeastLoadedNode() {

@Test
public void noLeastLoadedNode() {
clusterClient.ready(null, time.milliseconds());
assertNotEquals(null, clusterClient.leastLoadedNode(time.milliseconds()));
NetworkClient nc = new NetworkClient(selector, clusterMetadataUpdater, "mock-cluster-md", Integer.MAX_VALUE,
0, 0, 64 * 1024, 64 * 1024,
defaultRequestTimeoutMs, connectionSetupTimeoutMsTest, connectionSetupTimeoutMaxMsTest, time, true, new ApiVersions(), new LogContext(),
LeastLoadedNodeAlgorithm.VANILLA, new ArrayList<>());
nc.ready(node, time.milliseconds());
assertFalse(client.isReady(node, time.milliseconds()));
assertEquals(null, nc.leastLoadedNode(time.milliseconds()));
}

@Test
Expand Down

0 comments on commit c3d21a4

Please sign in to comment.