8990919293949596979899
DruidPooledConnection conn = (DruidPooledConnection) dataSource.getConnection(); conn.close(); SQLException error = new SQLException(); try { conn.handleException(error); } catch (SQLException ex) { Assert.assertEquals(error, ex); } }
102103104105106107108109110111112
conn.getConnection().close(); { SQLException error = null; try { conn.handleException(new RuntimeException()); } catch (SQLException ex) { error = ex; } Assert.assertNotNull(error); }
119120121122123124125126127128129
166167168169170171172173174175176
conn.close(); { SQLException error = null; try { conn.handleException(new RuntimeException()); } catch (SQLException ex) { error = ex; } Assert.assertNotNull(error); }
3233343536373839404142
conn.close(); Exception error = null; try { conn.handleException(new RuntimeException()); } catch (SQLException e) { error = e; } Assert.assertNotNull(error);
4950515253545556575859
public void test_handleException_1() throws Exception { DruidPooledConnection conn = (DruidPooledConnection) dataSource.getConnection(); Exception error = null; try { conn.handleException(new RuntimeException()); } catch (SQLException e) { error = e; } Assert.assertNotNull(error);
5354555657585960616263
pstmt.setFetchSize(1000); SQLException exception = new SQLException("xx", "xxx", 28); boolean fatal = false; try { conn.handleException(exception); } catch (SQLException ex) { fatal = true; } Assert.assertTrue(fatal);