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
@@ -15,10 +15,13 @@
*/
package com.alibaba.druid.bvt.proxy;
import junit.framework.Assert;
import org.junit.Assert;
import junit.framework.TestCase;
import com.alibaba.druid.proxy.DruidDriver;
import com.alibaba.druid.stat.JdbcConnectionStat;
import com.alibaba.druid.stat.JdbcStatManager;
public class StatisticTest extends TestCase {
@@ -30,4 +33,9 @@ public class StatisticTest extends TestCase {
stat.setActiveCount(2);
Assert.assertEquals(2, stat.getActiveMax());
}
protected void tearDown() throws Exception {
DruidDriver.getProxyDataSources().clear();
Assert.assertEquals(0, JdbcStatManager.getInstance().getSqlList().size());
}
}