mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bvt
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@756 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
+29
-1
@@ -2,6 +2,7 @@ package com.alibaba.druid.bvt.pool.basic;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.Statement;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
@@ -11,7 +12,7 @@ import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.alibaba.druid.stat.DruidDataSourceStatManager;
|
||||
import com.mysql.jdbc.ResultSet;
|
||||
|
||||
public class PrepareStatementTest extends TestCase {
|
||||
public class ConnectionStatementTest extends TestCase {
|
||||
|
||||
private MockDriver driver;
|
||||
private DruidDataSource dataSource;
|
||||
@@ -85,4 +86,31 @@ public class PrepareStatementTest extends TestCase {
|
||||
|
||||
conn.close();
|
||||
}
|
||||
|
||||
public void test_create() throws Exception {
|
||||
Connection conn = dataSource.getConnection();
|
||||
|
||||
Statement stmt = conn.createStatement();
|
||||
stmt.close();
|
||||
|
||||
conn.close();
|
||||
}
|
||||
|
||||
public void test_create1() throws Exception {
|
||||
Connection conn = dataSource.getConnection();
|
||||
|
||||
Statement stmt = conn.createStatement(ResultSet.FETCH_FORWARD, ResultSet.CONCUR_READ_ONLY);
|
||||
stmt.close();
|
||||
|
||||
conn.close();
|
||||
}
|
||||
|
||||
public void test_create2() throws Exception {
|
||||
Connection conn = dataSource.getConnection();
|
||||
|
||||
Statement stmt = conn.createStatement(ResultSet.FETCH_FORWARD, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
|
||||
stmt.close();
|
||||
|
||||
conn.close();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user