use of org.apache.commons.dbcp.DelegatingConnection in project pentaho-kettle by pentaho.
the class ConnectionPoolUtilIntegrationIT method testAccessToUnderlyingConnectionAllowedProperty.
@Test
public void testAccessToUnderlyingConnectionAllowedProperty() throws Exception {
Connection conn = null;
DatabaseMeta dbMeta = new DatabaseMeta("testAccessToUnderlying", "H2", "JDBC", null, "mem:test", null, "SA", "");
dbMeta.setConnectionPoolingProperties(dsProps);
try {
conn = ConnectionPoolUtil.getConnection(logChannelInterface, dbMeta, "part1", INITIAL_POOL_SIZE, MAX_ACTIVE);
Connection dconn = ((DelegatingConnection) conn).getInnermostDelegate();
assertNotNull("Property 'accessToUnderlyingConnectionAllowed' doesn't work", dconn);
} catch (Exception e) {
fail();
}
}
Aggregations