Skip to content

Commit 4fabd1b

Browse files
committed
review comment changes.
1 parent 5f0ce9f commit 4fabd1b

File tree

2 files changed

+8
-21
lines changed

2 files changed

+8
-21
lines changed

athena-jdbc/src/test/java/com/amazonaws/athena/connectors/jdbc/JdbcEnvironmentPropertiesTest.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,4 @@ public void testSecretWithSpecialCharacters() {
136136
String expected = BASE_CONNECTION_STRING + "?${" + specialSecret + "}";
137137
assertEquals(expected, result.get(DEFAULT));
138138
}
139-
140-
@Test
141-
public void testMultipleSecretsAndParams() {
142-
String secret1 = "secret1";
143-
String secret2 = "secret2";
144-
String params = "param1=value1&param2=value2";
145-
146-
connectionProperties.put(SECRET_NAME, secret1 + "," + secret2);
147-
connectionProperties.put(JDBC_PARAMS, params);
148-
149-
Map<String, String> result = jdbcEnvironmentProperties.connectionPropertiesToEnvironment(connectionProperties);
150-
String expected = BASE_CONNECTION_STRING + "?" + params + "&${" + secret1 + "," + secret2 + "}";
151-
assertEquals(expected, result.get(DEFAULT));
152-
}
153-
154139
}

athena-jdbc/src/test/java/com/amazonaws/athena/connectors/jdbc/manager/JDBCUtilTest.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,11 @@ public void createJdbcMetadataHandlerMap()
138138
@Test(expected = IllegalArgumentException.class)
139139
public void createJdbcMetadataHandlerMapDifferentDatabasesThrows()
140140
{
141+
// Mux with different database types is not supported.
141142
JDBCUtil.createJdbcMetadataHandlerMap(ImmutableMap.<String, String>builder()
142-
.put("testCatalog1_connection_string", CONNECTION_STRING1)
143-
.put("testCatalog2_connection_string", CONNECTION_STRING2)
144-
.put(DEFAULT, CONNECTION_STRING2)
143+
.put("testCatalog_connection_string", CONNECTION_STRING1)
144+
.put("wrong_connection_string", CONNECTION_STRING2)
145+
.put(DEFAULT, CONNECTION_STRING1)
145146
.put("AWS_LAMBDA_FUNCTION_NAME", "functionName")
146147
.build(), new FakeDatabaseMetadataHandlerFactory());
147148
}
@@ -179,10 +180,11 @@ public void createJdbcRecordHandlerMap()
179180
@Test(expected = IllegalArgumentException.class)
180181
public void createJdbcRecordHandlerMapDifferentDatabasesThrows()
181182
{
183+
// Mux with different database types is not supported.
182184
JDBCUtil.createJdbcRecordHandlerMap(ImmutableMap.<String, String>builder()
183-
.put("testCatalog1_connection_string", CONNECTION_STRING1)
184-
.put("testCatalog2_connection_string", CONNECTION_STRING2)
185-
.put(DEFAULT, CONNECTION_STRING2)
185+
.put("testCatalog_connection_string", CONNECTION_STRING1)
186+
.put("wrong_connection_string", CONNECTION_STRING2)
187+
.put(DEFAULT, CONNECTION_STRING1)
186188
.put("AWS_LAMBDA_FUNCTION_NAME", "functionName")
187189
.build(), new FakeDatabaseRecordHandlerFactory());
188190
}

0 commit comments

Comments
 (0)