Skip to content

Commit 5db7465

Browse files
authored
add error msg (#2282)
1 parent 6c27ec8 commit 5db7465

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/test/java/com/microsoft/sqlserver/jdbc/fedauth/ErrorMessageTest.java

+3
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ public void testADPasswordWrongPasswordWithConnectionStringUserName() throws SQL
396396
+ " in Active Directory (Authentication=ActiveDirectoryPassword).")
397397
&& e.getCause().getCause().getMessage().toLowerCase().contains("invalid username or password")
398398
|| e.getCause().getCause().getMessage().contains(ERR_MSG_SIGNIN_TOO_MANY)
399+
|| e.getCause().getCause().getMessage().contains(ERR_FAULT_ID3342)
399400
|| e.getMessage().contains(ERR_MSG_REQUEST_THROTTLED));
400401
}
401402
}
@@ -422,6 +423,7 @@ public void testADPasswordWrongPasswordWithDatasource() throws SQLException {
422423
+ " in Active Directory (Authentication=ActiveDirectoryPassword).")
423424
&& e.getCause().getCause().getMessage().toLowerCase().contains("invalid username or password")
424425
|| e.getCause().getCause().getMessage().contains(ERR_MSG_SIGNIN_TOO_MANY)
426+
|| e.getCause().getCause().getMessage().contains(ERR_FAULT_ID3342)
425427
|| e.getMessage().contains(ERR_MSG_REQUEST_THROTTLED));
426428
}
427429
}
@@ -442,6 +444,7 @@ public void testADPasswordWrongPasswordWithConnectionStringUser() throws SQLExce
442444
+ " in Active Directory (Authentication=ActiveDirectoryPassword).")
443445
&& e.getCause().getCause().getMessage().toLowerCase().contains("invalid username or password")
444446
|| e.getCause().getCause().getMessage().contains(ERR_MSG_SIGNIN_TOO_MANY)
447+
|| e.getCause().getCause().getMessage().contains(ERR_FAULT_ID3342)
445448
|| e.getMessage().contains(ERR_MSG_REQUEST_THROTTLED));
446449
}
447450
}

src/test/java/com/microsoft/sqlserver/jdbc/fedauth/FedauthCommon.java

+1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public class FedauthCommon extends AbstractTest {
127127
static final String ERR_MSG_HAS_CLOSED = TestResource.getResource("R_hasClosed");
128128
static final String ERR_MSG_HAS_BEEN_CLOSED = TestResource.getResource("R_hasBeenClosed");
129129
static final String ERR_MSG_SIGNIN_TOO_MANY = TestResource.getResource("R_signinTooManyTimes");
130+
static final String ERR_FAULT_ID3342 = "FaultMessage: ID3242";
130131
static final String ERR_MSG_NOT_AUTH_AND_IS = TestUtils.R_BUNDLE
131132
.getString("R_SetAuthenticationWhenIntegratedSecurityTrue");
132133
static final String ERR_MSG_NOT_AUTH_AND_USER_PASSWORD = TestUtils.R_BUNDLE

0 commit comments

Comments
 (0)