Skip to content

Commit 5ea540a

Browse files
committed
Fix test issue.
1 parent ac73678 commit 5ea540a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

driver-core/src/test/unit/com/mongodb/internal/connection/ServerDeprioritizationTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,10 @@ void onAttemptFailureIgnoresIfNonShardedWithOverloadErrorAndDisabledOverloadReta
233233
ClusterDescription cluster = multipleModeClusterDescription(clusterType);
234234
ServerSelector selector = createAssertingSelector(ALL_SERVERS, singletonList(SERVER_A));
235235

236-
serverDeprioritization = new OperationContext.ServerDeprioritization(false);
237-
deprioritize(clusterType, createSystemOverloadedError(), SERVER_B);
236+
ServerDeprioritization serverDeprioritization = new OperationContext.ServerDeprioritization(false);
237+
serverDeprioritization.updateCandidate(SERVER_B.getAddress(), clusterType);
238+
serverDeprioritization.onAttemptFailure(createSystemOverloadedError());
239+
238240
assertEquals(singletonList(SERVER_A), serverDeprioritization.apply(selector).select(cluster),
239241
format("Expected no deprioritization when overloadRetargeting is disabled for %s with SystemOverloadedError", clusterType));
240242
}

0 commit comments

Comments
 (0)