Skip to content

Commit abdf56a

Browse files
authored
Merge branch 'mongodb:main' into main
2 parents 662c519 + 07a7357 commit abdf56a

File tree

5 files changed

+31
-6
lines changed

5 files changed

+31
-6
lines changed

driver-core/src/main/com/mongodb/internal/connection/AbstractMultiServerCluster.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public void onChange(final ServerDescriptionChangedEvent event) {
231231

232232
private boolean handleReplicaSetMemberChanged(final ServerDescription newDescription) {
233233
if (!newDescription.isReplicaSetMember()) {
234-
LOGGER.error(format("Expecting replica set member, but found a %s. Removing %s from client view of cluster.",
234+
LOGGER.warn(format("Expecting replica set member, but found a %s. Removing %s from client view of cluster.",
235235
newDescription.getType(), newDescription.getAddress()));
236236
removeServer(newDescription.getAddress());
237237
return true;
@@ -247,7 +247,7 @@ private boolean handleReplicaSetMemberChanged(final ServerDescription newDescrip
247247
}
248248

249249
if (!replicaSetName.equals(newDescription.getSetName())) {
250-
LOGGER.error(format("Expecting replica set member from set '%s', but found one from set '%s'. "
250+
LOGGER.warn(format("Expecting replica set member from set '%s', but found one from set '%s'. "
251251
+ "Removing %s from client view of cluster.",
252252
replicaSetName, newDescription.getSetName(), newDescription.getAddress()));
253253
removeServer(newDescription.getAddress());
@@ -259,7 +259,7 @@ private boolean handleReplicaSetMemberChanged(final ServerDescription newDescrip
259259
if (newDescription.getCanonicalAddress() != null
260260
&& !newDescription.getAddress().equals(new ServerAddress(newDescription.getCanonicalAddress()))
261261
&& !newDescription.isPrimary()) {
262-
LOGGER.info(format("Canonical address %s does not match server address. Removing %s from client view of cluster",
262+
LOGGER.warn(format("Canonical address %s does not match server address. Removing %s from client view of cluster",
263263
newDescription.getCanonicalAddress(), newDescription.getAddress()));
264264
removeServer(newDescription.getAddress());
265265
return true;
@@ -342,7 +342,7 @@ private boolean isNotAlreadyPrimary(final ServerAddress address) {
342342

343343
private boolean handleShardRouterChanged(final ServerDescription newDescription) {
344344
if (!newDescription.isShardRouter()) {
345-
LOGGER.error(format("Expecting a %s, but found a %s. Removing %s from client view of cluster.",
345+
LOGGER.warn(format("Expecting a %s, but found a %s. Removing %s from client view of cluster.",
346346
SHARD_ROUTER, newDescription.getType(), newDescription.getAddress()));
347347
removeServer(newDescription.getAddress());
348348
}
@@ -351,7 +351,7 @@ private boolean handleShardRouterChanged(final ServerDescription newDescription)
351351

352352
private boolean handleStandAloneChanged(final ServerDescription newDescription) {
353353
if (getSettings().getHosts().size() > 1) {
354-
LOGGER.error(format("Expecting a single %s, but found more than one. Removing %s from client view of cluster.",
354+
LOGGER.warn(format("Expecting a single %s, but found more than one. Removing %s from client view of cluster.",
355355
STANDALONE, newDescription.getAddress()));
356356
clusterType = UNKNOWN;
357357
removeServer(newDescription.getAddress());
Submodule specifications updated 78 files

driver-core/src/test/unit/com/mongodb/AuthConnectionStringTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ public void shouldPassAllOutcomes() {
5656
assumeFalse(description.equals("should accept forwardAndReverse hostname canonicalization (GSSAPI)"));
5757
assumeFalse(description.equals("should accept generic mechanism property (GSSAPI)"));
5858
assumeFalse(description.equals("should accept no hostname canonicalization (GSSAPI)"));
59+
assumeFalse("https://jira.mongodb.org/browse/JAVA-6030",
60+
description.equals("should throw an exception if AWS_SESSION_TOKEN provided (MONGODB-AWS)"));
61+
assumeFalse("https://jira.mongodb.org/browse/JAVA-6030",
62+
description.equals("should throw an exception if username and password provided (MONGODB-AWS)"));
5963

6064
if (definition.getBoolean("valid").getValue()) {
6165
testValidUris();

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public class ServerDiscoveryAndMonitoringTest extends AbstractServerDiscoveryAnd
5454

5555
public ServerDiscoveryAndMonitoringTest(final String description, final BsonDocument definition) {
5656
super(definition);
57+
assumeFalse("https://jira.mongodb.org/browse/JAVA-5949",
58+
description.equals("error_handling_handshake.json: Network timeouts before and after the handshake completes"));
59+
5760
this.description = description;
5861
init(serverAddress -> NO_OP_SERVER_LISTENER, NO_OP_CLUSTER_LISTENER);
5962
}

driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTestModifications.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,24 @@ public static void applyCustomizations(final TestDef def) {
420420
.file("server-discovery-and-monitoring", "pool-clear-on-error-checkout");
421421
def.skipJira("https://jira.mongodb.org/browse/JAVA-5664")
422422
.file("server-discovery-and-monitoring", "pool-cleared-on-min-pool-size-population-error");
423+
def.skipJira("https://jira.mongodb.org/browse/JAVA-5949")
424+
.file("server-discovery-and-monitoring", "backpressure-network-error-fail");
425+
def.skipJira("https://jira.mongodb.org/browse/JAVA-5949")
426+
.file("server-discovery-and-monitoring", "backpressure-network-timeout-error");
427+
def.skipJira("https://jira.mongodb.org/browse/JAVA-5949")
428+
.file("server-discovery-and-monitoring", "backpressure-server-description-unchanged-on-min-pool-size-population-error");
429+
430+
// session tests
431+
def.skipJira("https://jira.mongodb.org/browse/JAVA-5968")
432+
.test("sessions", "snapshot-sessions", "Find operation with snapshot and snapshot time");
433+
def.skipJira("https://jira.mongodb.org/browse/JAVA-5968")
434+
.test("sessions", "snapshot-sessions", "Distinct operation with snapshot and snapshot time");
435+
def.skipJira("https://jira.mongodb.org/browse/JAVA-5968")
436+
.test("sessions", "snapshot-sessions", "Aggregate operation with snapshot and snapshot time");
437+
def.skipJira("https://jira.mongodb.org/browse/JAVA-5968")
438+
.test("sessions", "snapshot-sessions", "countDocuments operation with snapshot and snapshot time");
439+
def.skipJira("https://jira.mongodb.org/browse/JAVA-5968")
440+
.test("sessions", "snapshot-sessions", "Mixed operation with snapshot and snapshotTime");
423441

424442
// transactions
425443

0 commit comments

Comments
 (0)