refactor DruidDataSource

This commit is contained in:
wenshao
2012-08-17 11:12:21 +08:00
parent c19cae3dd4
commit 7fef105f22
8 changed files with 40 additions and 40 deletions
@@ -3,7 +3,7 @@ package com.alibaba.druid.bvt.pool;
import junit.framework.Assert;
import junit.framework.TestCase;
import com.alibaba.druid.pool.ConnectionHolder;
import com.alibaba.druid.pool.DruidConnectionHolder;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.alibaba.druid.pool.DruidPooledPreparedStatement;
@@ -29,7 +29,7 @@ public class PSCacheTest3 extends TestCase {
public void test_pscache() throws Exception {
DruidPooledConnection conn = dataSource.getConnection();
ConnectionHolder holder = conn.getConnectionHolder();
DruidConnectionHolder holder = conn.getConnectionHolder();
PreparedStatementPool stmtPool = holder.getStatementPool();
final String sql_0 = "select 0";
@@ -4,7 +4,7 @@ import junit.framework.Assert;
import junit.framework.TestCase;
import com.alibaba.druid.TestForZY.A;
import com.alibaba.druid.pool.ConnectionHolder;
import com.alibaba.druid.pool.DruidConnectionHolder;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.alibaba.druid.pool.DruidPooledPreparedStatement;
@@ -32,7 +32,7 @@ public class PSCacheTest4 extends TestCase {
public void test_pscache() throws Exception {
DruidPooledConnection conn = dataSource.getConnection();
ConnectionHolder holder = conn.getConnectionHolder();
DruidConnectionHolder holder = conn.getConnectionHolder();
PreparedStatementPool stmtPool = holder.getStatementPool();
final String sql_0 = "select 0";
@@ -6,7 +6,7 @@ import org.junit.Assert;
import com.alibaba.druid.mock.MockConnection;
import com.alibaba.druid.mock.MockPreparedStatement;
import com.alibaba.druid.pool.ConnectionHolder;
import com.alibaba.druid.pool.DruidConnectionHolder;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledPreparedStatement.PreparedStatementKey;
import com.alibaba.druid.pool.PreparedStatementHolder;
@@ -147,7 +147,7 @@ public class PreparedStatementKeyTest extends TestCase {
MockConnection conn = new MockConnection();
PreparedStatementKey k1 = new PreparedStatementKey("x1", "c1", MethodType.M1);
PreparedStatementPool pool = new PreparedStatementPool(new ConnectionHolder(dataSource, conn));
PreparedStatementPool pool = new PreparedStatementPool(new DruidConnectionHolder(dataSource, conn));
MockPreparedStatement raw = new MockPreparedStatement(null, null);
pool.put(new PreparedStatementHolder(k1, raw));