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
@@ -20,15 +20,21 @@ import java.sql.Driver;
import java.sql.DriverManager;
import java.util.Properties;
import junit.framework.Assert;
import junit.framework.TestCase;
import org.junit.Assert;
import com.alibaba.druid.proxy.DruidDriver;
import com.alibaba.druid.proxy.jdbc.ConnectionProxy;
import com.alibaba.druid.proxy.jdbc.DataSourceProxy;
import com.alibaba.druid.stat.JdbcStatManager;
public class DriverTest extends TestCase {
protected void tearDown() throws Exception {
DruidDriver.getProxyDataSources().clear();
Assert.assertEquals(0, JdbcStatManager.getInstance().getSqlList().size());
}
public void test_driver() throws Exception {
String url_0 = "jdbc:wrap-jdbc:filters=default:name=driverTest:jdbc:derby:memory:driverTestDB;create=true";
String url_1 = "jdbc:wrap-jdbc:filters=counter:name=driverTest:jdbc:derby:memory:driverTestDB;create=true";