use of util.JdbcConnection in project infinispan by infinispan.
the class AbstractSQLStoreFunctionalTest method getDatabases.
protected static HashMap<DatabaseType, JdbcConnection> getDatabases() {
Objects.requireNonNull(JDBC_URL);
Objects.requireNonNull(JDBC_USERNAME);
Objects.requireNonNull(JDBC_PASSWORD);
Objects.requireNonNull(DATABASE);
List<DatabaseType> databaseTypes = Arrays.stream(DATABASE.split(",")).map(DatabaseType::guessDialect).collect(Collectors.toList());
HashMap<DatabaseType, JdbcConnection> map = new HashMap<>();
for (int i = 0; i < databaseTypes.size(); i++) {
String jdbcURL = JDBC_URL.split(",")[i];
String username = JDBC_USERNAME.split(",")[i];
String password = JDBC_PASSWORD.split(",")[i];
JdbcConnection jdbcConnection = new JdbcConnection(jdbcURL, username, password);
DatabaseType databaseType = databaseTypes.get(i);
map.put(databaseType, jdbcConnection);
}
return map;
}
Aggregations