Search in sources :

Example 1 with JDBCConnection

use of org.hsqldb.jdbc.JDBCConnection in project mybatis-3 by mybatis.

the class PooledDataSourceTest method ShouldReturnRealConnection.

@Test
void ShouldReturnRealConnection() throws Exception {
    PooledDataSource ds = createPooledDataSource(JPETSTORE_PROPERTIES);
    Connection c = ds.getConnection();
    JDBCConnection realConnection = (JDBCConnection) PooledDataSource.unwrapConnection(c);
    c.close();
}
Also used : Connection(java.sql.Connection) JDBCConnection(org.hsqldb.jdbc.JDBCConnection) JDBCConnection(org.hsqldb.jdbc.JDBCConnection) PooledDataSource(org.apache.ibatis.datasource.pooled.PooledDataSource) Test(org.junit.jupiter.api.Test) BaseDataTest(org.apache.ibatis.BaseDataTest)

Aggregations

Connection (java.sql.Connection)1 BaseDataTest (org.apache.ibatis.BaseDataTest)1 PooledDataSource (org.apache.ibatis.datasource.pooled.PooledDataSource)1 JDBCConnection (org.hsqldb.jdbc.JDBCConnection)1 Test (org.junit.jupiter.api.Test)1