Skip to content

Commit

Permalink
chore(test): Add HikariConfig to initDatabase util used for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
armory-abedonik committed Apr 14, 2023
1 parent f7c9ef7 commit 2734ab1
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,16 @@ public static TestDatabase initDatabase(String jdbcUrl, SQLDialect dialect) {
}

public static TestDatabase initDatabase(String jdbcUrl, SQLDialect dialect, String dbName) {
HikariConfig cpConfig = new HikariConfig();
cpConfig.setJdbcUrl(jdbcUrl);
cpConfig.setMaximumPoolSize(5);
HikariDataSource dataSource = new HikariDataSource(cpConfig);
var hikariConfig = new HikariConfig();
hikariConfig.setJdbcUrl(jdbcUrl);
hikariConfig.setMaximumPoolSize(5);

return initDatabase(hikariConfig, dialect, dbName);
}

public static TestDatabase initDatabase(
HikariConfig hikariConfig, SQLDialect dialect, String dbName) {
HikariDataSource dataSource = new HikariDataSource(hikariConfig);

DefaultConfiguration config = new DefaultConfiguration();
config.set(new DataSourceConnectionProvider(dataSource));
Expand Down

0 comments on commit 2734ab1

Please sign in to comment.