Skip to content

Commit

Permalink
Fixed test, removed secret (#2030)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkyc authored Dec 29, 2022
1 parent 057ec0c commit 1290f9c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ public static void setupTest() throws Exception {
@Test
@Tag(Constants.xAzureSQLDB)
public void testCallableStatementManyParameters() throws SQLException {
String tempPass = UUID.randomUUID().toString();
String dropLogin = "IF EXISTS (select * from sys.sql_logins where name = 'NewLogin') DROP LOGIN NewLogin";
String dropUser = "IF EXISTS (select * from sys.sysusers where name = 'NewUser') DROP USER NewUser";
String createLogin = "USE MASTER;CREATE LOGIN NewLogin WITH PASSWORD=N'P4ssword', " +
String createLogin = "USE MASTER;CREATE LOGIN NewLogin WITH PASSWORD=N'" + tempPass + "', " +
"DEFAULT_DATABASE = MASTER, DEFAULT_LANGUAGE = US_ENGLISH;ALTER LOGIN NewLogin ENABLE;";
String createUser = "USE MASTER;CREATE USER NewUser FOR LOGIN NewLogin WITH DEFAULT_SCHEMA = [DBO];";
String grantExecute = "GRANT EXECUTE ON " + manyParamProc + " TO NewUser;";
Expand All @@ -113,7 +114,7 @@ public void testCallableStatementManyParameters() throws SQLException {
}
}

try (Connection conn = PrepUtil.getConnection(connectionString + ";user=NewLogin;password=P4ssword;")) {
try (Connection conn = PrepUtil.getConnection(connectionString + ";user=NewLogin;password=" + tempPass + ";")) {
BigDecimal money = new BigDecimal("9999.99");

// Should not throw an "Index is out of range error"
Expand Down

0 comments on commit 1290f9c

Please sign in to comment.