diff --git a/src/test/java/com/alibaba/druid/bvt/pool/PoolableResultSetTest.java b/src/test/java/com/alibaba/druid/bvt/pool/PoolableResultSetTest.java index c8e48c9404..0110a7f3fe 100644 --- a/src/test/java/com/alibaba/druid/bvt/pool/PoolableResultSetTest.java +++ b/src/test/java/com/alibaba/druid/bvt/pool/PoolableResultSetTest.java @@ -12,6 +12,7 @@ import com.alibaba.druid.pool.PoolableStatement; public class PoolableResultSetTest extends TestCase { + @SuppressWarnings("deprecation") public void test_0() throws Exception { PoolableStatement stmt = new PoolableStatement(null, null) { @@ -240,5 +241,176 @@ public class PoolableResultSetTest extends TestCase { Assert.assertNotNull(error); } + // //////////////// + + { + SQLException error = null; + try { + resultSet.getString("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getBoolean("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getByte("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getShort("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getInt("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getLong("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getFloat("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getDouble("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getBigDecimal("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getBigDecimal("0", 1); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getBytes("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getDate("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getTime("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getTimestamp("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getAsciiStream("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getUnicodeStream("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getBinaryStream("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } } }