mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
test
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@721 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -12,6 +12,7 @@ import junit.framework.TestCase;
|
||||
|
||||
import com.alibaba.druid.mock.MockDriver;
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.alibaba.druid.stat.DruidDataSourceStatManager;
|
||||
|
||||
public class TestIdle3_Concurrent_MaxActive extends TestCase {
|
||||
|
||||
@@ -19,6 +20,8 @@ public class TestIdle3_Concurrent_MaxActive extends TestCase {
|
||||
private DruidDataSource dataSource;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
Assert.assertEquals(0, DruidDataSourceStatManager.getInstance().getDataSourceList().size());
|
||||
|
||||
driver = new MockDriver();
|
||||
|
||||
dataSource = new DruidDataSource();
|
||||
@@ -39,6 +42,7 @@ public class TestIdle3_Concurrent_MaxActive extends TestCase {
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
dataSource.close();
|
||||
Assert.assertEquals(0, DruidDataSourceStatManager.getInstance().getDataSourceList().size());
|
||||
}
|
||||
|
||||
public void test_idle2() throws Exception {
|
||||
|
||||
@@ -32,6 +32,8 @@ public class TestRemoveAbandoned extends TestCase {
|
||||
dataSource.setTestOnBorrow(false);
|
||||
dataSource.setValidationQuery("SELECT 1");
|
||||
dataSource.setFilters("stat");
|
||||
|
||||
Assert.assertEquals(0, DruidDataSourceStatManager.getInstance().getDataSourceList().size());
|
||||
}
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user