@@ -406,7 +406,7 @@ public void test3p2AuthFailsWithoutCachedToken() {
406406 MongoClientSettings clientSettings = createSettings (callback );
407407 try (MongoClient mongoClient = createMongoClient (clientSettings )) {
408408 assertCause (MongoCommandException .class ,
409- "Command failed with error 18 (AuthenticationFailed):" ,
409+ "Command execution failed on MongoDB server with error 18 (AuthenticationFailed):" ,
410410 () -> performFind (mongoClient ));
411411 }
412412 }
@@ -424,7 +424,7 @@ public void test3p3UnexpectedErrorDoesNotClearCache() {
424424 try (MongoClient mongoClient = createMongoClient (clientSettings )) {
425425 failCommand (20 , 1 , "saslStart" );
426426 assertCause (MongoCommandException .class ,
427- "Command failed with error 20" ,
427+ "Command execution failed on MongoDB server with error 20" ,
428428 () -> performFind (mongoClient ));
429429
430430 assertEquals (Arrays .asList (
@@ -471,7 +471,7 @@ public void test4p2ReadCommandsFailIfReauthenticationFails() {
471471 performFind (mongoClient );
472472 failCommand (391 , 1 , "find" );
473473 assertCause (MongoCommandException .class ,
474- "Command failed with error 18" ,
474+ "Command execution failed on MongoDB server with error 18" ,
475475 () -> performFind (mongoClient ));
476476 }
477477 assertEquals (2 , wrappedCallback .invocations .get ());
@@ -492,7 +492,7 @@ public void test4p3WriteCommandsFailIfReauthenticationFails() {
492492 performInsert (mongoClient );
493493 failCommand (391 , 1 , "insert" );
494494 assertCause (MongoCommandException .class ,
495- "Command failed with error 18" ,
495+ "Command execution failed on MongoDB server with error 18" ,
496496 () -> performInsert (mongoClient ));
497497 }
498498 assertEquals (2 , wrappedCallback .invocations .get ());
@@ -740,7 +740,7 @@ public void testh3p2NoSpecAuthIfNoCachedToken() {
740740 TestCommandListener commandListener = new TestCommandListener (listener );
741741 assertFindFails (createHumanSettings (createHumanCallback (), commandListener ),
742742 MongoCommandException .class ,
743- "Command failed with error 18" );
743+ "Command execution failed on MongoDB server with error 18" );
744744 assertEquals (Arrays .asList (
745745 "isMaster started" ,
746746 "isMaster succeeded" ,
@@ -833,7 +833,7 @@ public void testh4p4Fails() {
833833 assertEquals (1 , callback1 .getInvocations ());
834834 failCommand (391 , 1 , "find" );
835835 assertCause (MongoCommandException .class ,
836- "Command failed with error 18" ,
836+ "Command execution failed on MongoDB server with error 18" ,
837837 () -> performFind (mongoClient ));
838838 assertEquals (3 , callback1 .getInvocations ());
839839 }
0 commit comments