Skip to content

Commit

Permalink
chore(test): Add HikariConfig to initDatabase util used for testing. (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
armory-abedonik authored and droustchev-pd committed May 11, 2023
1 parent f6b7c85 commit 69a40a3
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 69a40a3

Please sign in to comment.