fixed testcase

This commit is contained in:
wenshao
2013-04-30 13:55:56 +08:00
parent 1b2ffe9d80
commit fc14629e95
47 changed files with 285 additions and 44 deletions
@@ -27,7 +27,9 @@ import java.sql.Statement;
import junit.framework.Assert;
import junit.framework.TestCase;
import com.alibaba.druid.proxy.DruidDriver;
import com.alibaba.druid.proxy.jdbc.ClobProxy;
import com.alibaba.druid.stat.JdbcStatManager;
import com.alibaba.druid.util.JdbcUtils;
public class ClobTest extends TestCase {
@@ -44,6 +46,13 @@ public class ClobTest extends TestCase {
conn.close();
}
protected void tearDown() throws Exception {
dropTable();
DruidDriver.getProxyDataSources().clear();
Assert.assertEquals(0, JdbcStatManager.getInstance().getSqlList().size());
}
private void createTable() throws SQLException {
Connection conn = DriverManager.getConnection(create_url);
Statement stmt = conn.createStatement();
@@ -60,10 +69,6 @@ public class ClobTest extends TestCase {
conn.close();
}
protected void tearDown() throws Exception {
dropTable();
}
public void test_clob() throws Exception {
Connection conn = null;