use of com.alibaba.druid.pool.DruidPooledStatement in project druid by alibaba.
the class PoolableStatementTest2 method test_MaxRows.
public void test_MaxRows() throws Exception {
Connection conn = dataSource.getConnection();
Statement stmt = conn.createStatement();
stmt.setMaxRows(44);
Assert.assertEquals(44, stmt.getMaxRows());
((DruidPooledStatement) stmt).getStatement().close();
{
SQLException error = null;
try {
stmt.getMaxRows();
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
SQLException error = null;
try {
stmt.setMaxRows(23);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
stmt.close();
conn.close();
}
use of com.alibaba.druid.pool.DruidPooledStatement in project druid by alibaba.
the class PoolableStatementTest2 method test_executeUpdate_6.
public void test_executeUpdate_6() throws Exception {
Connection conn = dataSource.getConnection();
Statement stmt = conn.createStatement();
stmt.executeUpdate("SET 1", new String[0]);
((DruidPooledStatement) stmt).getStatement().close();
{
SQLException error = null;
try {
stmt.executeUpdate("SET 1", new String[0]);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
stmt.close();
conn.close();
}
use of com.alibaba.druid.pool.DruidPooledStatement in project druid by alibaba.
the class PoolableStatementTest2 method test_executeUpdate_7.
public void test_executeUpdate_7() throws Exception {
Connection conn = dataSource.getConnection();
Statement stmt = conn.createStatement();
stmt.executeUpdate("SET 1", new int[0]);
((DruidPooledStatement) stmt).getStatement().close();
{
SQLException error = null;
try {
stmt.executeUpdate("SET 1", new int[0]);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
stmt.close();
conn.close();
}
use of com.alibaba.druid.pool.DruidPooledStatement in project druid by alibaba.
the class PoolableStatementTest2 method test_getResultSetConcurrency.
public void test_getResultSetConcurrency() throws Exception {
Connection conn = dataSource.getConnection();
Statement stmt = conn.createStatement();
stmt.getResultSetConcurrency();
((DruidPooledStatement) stmt).getStatement().close();
{
SQLException error = null;
try {
stmt.getResultSetConcurrency();
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
stmt.close();
conn.close();
}
use of com.alibaba.druid.pool.DruidPooledStatement in project druid by alibaba.
the class PoolableStatementTest2 method test_cancel.
public void test_cancel() throws Exception {
Connection conn = dataSource.getConnection();
Statement stmt = conn.createStatement();
stmt.cancel();
((DruidPooledStatement) stmt).getStatement().close();
{
SQLException error = null;
try {
stmt.cancel();
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
stmt.close();
conn.close();
}
Aggregations