mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
testcase refactor.
This commit is contained in:
@@ -4,18 +4,21 @@ import java.sql.Connection;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
import com.alibaba.druid.PoolTestCase;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
|
||||
public class CreateSchedulerTest extends TestCase {
|
||||
public class CreateSchedulerTest extends PoolTestCase {
|
||||
|
||||
private DruidDataSource dataSource;
|
||||
private ScheduledExecutorService createScheduler;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
createScheduler = Executors.newScheduledThreadPool(1);
|
||||
|
||||
dataSource = new DruidDataSource();
|
||||
@@ -28,6 +31,8 @@ public class CreateSchedulerTest extends TestCase {
|
||||
protected void tearDown() throws Exception {
|
||||
dataSource.close();
|
||||
createScheduler.shutdown();
|
||||
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
public void test_connectAndClose() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user