Skip to content

Commit 23332b2

Browse files
committed
Use com.mongodb.assertions.Assertions.fail for a Fake cluster.
1 parent bc0f8da commit 23332b2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.mongodb.ServerAddress;
2525
import com.mongodb.Tag;
2626
import com.mongodb.TagSet;
27+
import com.mongodb.assertions.Assertions;
2728
import com.mongodb.event.ServerDescriptionChangedEvent;
2829
import com.mongodb.internal.TimeoutContext;
2930
import com.mongodb.internal.connection.BaseCluster;
@@ -346,8 +347,7 @@ public ServersSnapshot getServersSnapshot(final Timeout serverSelectionTimeout,
346347

347348
@Override
348349
public void onChange(final ServerDescriptionChangedEvent event) {
349-
// We do not expect this to be called during server selection.
350-
fail();
350+
Assertions.fail();
351351
}
352352
}
353353

0 commit comments

Comments
 (0)