Skip to content

Commit 9173ac9

Browse files
committed
Update setAEConnectionString
1 parent afe62b3 commit 9173ac9

File tree

1 file changed

+7
-0
lines changed
  • src/test/java/com/microsoft/sqlserver/jdbc/AlwaysEncrypted

1 file changed

+7
-0
lines changed

src/test/java/com/microsoft/sqlserver/jdbc/AlwaysEncrypted/AESetup.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ static void setAEConnectionString(String serverName, String url, String protocol
184184
if (enclaveServer.length > 1) {
185185
System.out.println("Testing enclave: " + enclaveProperties);
186186
}
187+
188+
// remove the password in connection string
189+
// this is necessary as updateDataSource will only use 1st occurrence
190+
String password = getConfiguredProperty("enclaveServerPassword");
191+
AETestConnectionString = TestUtils.removeProperty(AETestConnectionString, Constants.PASSWORD);
192+
AETestConnectionString = TestUtils.addOrOverrideProperty(AETestConnectionString, Constants.PASSWORD,
193+
password);
187194
} else {
188195
AETestConnectionString = connectionString + ";sendTimeAsDateTime=false;columnEncryptionSetting=enabled;";
189196
}

0 commit comments

Comments
 (0)