use of org.hibernate.service.UnknownUnwrapTypeException 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);
Assert.assertNotNull(provider.unwrap(HikariConnectionProvider.class));
Assert.assertFalse(provider.supportsAggressiveRelease());
try {
provider.unwrap(TestHibernate.class);
Assert.fail("Expected exception");
} catch (UnknownUnwrapTypeException e) {
}
provider.stop();
}
Aggregations