private void testDataSource(HikariDataSource dataSourcePool) throws SQLException {
  try {
    Connection conn=null;
    try {
      conn=dataSourcePool.getConnection();
      testConnection(conn);
    }
  finally {
      if (conn != null) {
        conn.close();
      }
    }
  }
 catch (  SQLException e) {
    logConnectionFailure();
    throw e;
  }
}

private void testDataSource ( HikariDataSource dataSourcePool ) throws SQLException { try { Connection conn = null ; try { conn = dataSourcePool . getConnection ( ) ; testConnection ( conn ) ; } finally { if ( conn != null ) { conn . close ( ) ; } } } catch ( SQLException e ) { logConnectionFailure ( ) ; throw e ; } }
test an initialized datasourcepool by running a simple query .
