完善测试

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@803 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-09-16 06:30:22 +00:00
parent 6a1a477a14
commit 850493fb48
@@ -732,4 +732,26 @@ public class PoolableStatementTest2 extends TestCase {
stmt.close();
conn.close();
}
public void test_executeUpdate_3() throws Exception {
Connection conn = dataSource.getConnection();
Statement stmt = conn.createStatement();
stmt.executeUpdate("SELECT 1", Statement.NO_GENERATED_KEYS);
((PoolableStatement) stmt).getStatement().close();
{
SQLException error = null;
try {
stmt.execute("SELECT 1", Statement.NO_GENERATED_KEYS);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
stmt.close();
conn.close();
}
}