mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
test fixed
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@722 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -6,11 +6,16 @@ import java.util.Properties;
|
||||
|
||||
import com.alibaba.druid.mock.MockDriver;
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.alibaba.druid.stat.DruidDataSourceStatManager;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class Case1 extends TestCase {
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
Assert.assertEquals(0, DruidDataSourceStatManager.getInstance().getDataSourceList().size());
|
||||
}
|
||||
|
||||
public void test_f() throws Exception {
|
||||
final DruidDataSource dataSource = new DruidDataSource();
|
||||
dataSource.setTimeBetweenConnectErrorMillis(100);
|
||||
@@ -37,5 +42,7 @@ public class Case1 extends TestCase {
|
||||
|
||||
Connection conn = dataSource.getConnection();
|
||||
conn.close();
|
||||
|
||||
dataSource.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.alibaba.druid.stat.DruidDataSourceStatManager;
|
||||
import com.alibaba.druid.util.JMXUtils;
|
||||
|
||||
/**
|
||||
@@ -30,7 +31,10 @@ import com.alibaba.druid.util.JMXUtils;
|
||||
* @author admin 2011-5-4 下午02:45:21
|
||||
*/
|
||||
public class Case2 extends TestCase {
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
Assert.assertEquals(0, DruidDataSourceStatManager.getInstance().getDataSourceList().size());
|
||||
}
|
||||
|
||||
public void test_singleThread() throws Exception {
|
||||
|
||||
Class.forName("com.alibaba.druid.mock.MockDriver");
|
||||
|
||||
Reference in New Issue
Block a user