|
|
@ -385,8 +385,11 @@ public final class HikariPool implements HikariPoolMBean, IBagStateListener
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Statement statement = connection.createStatement();
|
|
|
|
Statement statement = connection.createStatement();
|
|
|
|
try
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (timeoutMs < Integer.MAX_VALUE)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
statement.setQueryTimeout((int) TimeUnit.MILLISECONDS.toSeconds(timeoutMs));
|
|
|
|
statement.setQueryTimeout((int) TimeUnit.MILLISECONDS.toSeconds(timeoutMs));
|
|
|
|
|
|
|
|
}
|
|
|
|
statement.executeQuery(configuration.getConnectionTestQuery());
|
|
|
|
statement.executeQuery(configuration.getConnectionTestQuery());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
finally
|
|
|
|