use of com.zaxxer.hikari.hibernate.HikariConnectionProvider in project HikariCP by brettwooldridge.
the class TestHibernate method testConnectionProvider.
@Test
public void testConnectionProvider() throws Exception {
HikariConnectionProvider provider = new HikariConnectionProvider();
Properties props = new Properties();
props.load(getClass().getResourceAsStream("/hibernate.properties"));
provider.configure(props);
Connection connection = provider.getConnection();
provider.closeConnection(connection);
assertNotNull(provider.unwrap(HikariConnectionProvider.class));
assertFalse(provider.supportsAggressiveRelease());
try {
provider.unwrap(TestHibernate.class);
fail("Expected exception");
} catch (UnknownUnwrapTypeException e) {
}
provider.stop();
}
Aggregations