File tree Expand file tree Collapse file tree
driver-core/src/test/unit/com/mongodb/internal/connection Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments