Code example for Connection

Methods: close

0
    public void test_error() throws Exception { 
        Assert.assertNull(dataSource.getPoolingPeakTime());
        Assert.assertNull(dataSource.getActivePeakTime());
         
        Connection conn = dataSource.getConnection();
        conn.close();
         
        Assert.assertNotNull(dataSource.getPoolingPeakTime());
        Assert.assertNotNull(dataSource.getActivePeakTime());
    } 
}