mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
fixed testcase.
This commit is contained in:
+16
-5
@@ -1,27 +1,38 @@
|
||||
package com.alibaba.druid.bvt.quartz;
|
||||
package com.alibaba.druid.test;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import com.alibaba.druid.PoolTestCase;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.quartz.Scheduler;
|
||||
import org.quartz.impl.StdScheduler;
|
||||
import org.quartz.impl.StdSchedulerFactory;
|
||||
|
||||
public class QuartzTest extends TestCase {
|
||||
public class QuartzTest extends PoolTestCase {
|
||||
|
||||
StdSchedulerFactory factory;
|
||||
Scheduler scheduler;
|
||||
StdScheduler scheduler;
|
||||
Properties props;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
Properties props = new Properties();
|
||||
super.setUp();
|
||||
|
||||
props = new Properties();
|
||||
props.load(getClass().getClassLoader().getResourceAsStream("bvt/quartz/quartz.properties"));
|
||||
factory = new StdSchedulerFactory(props);
|
||||
scheduler = factory.getScheduler();
|
||||
scheduler = (StdScheduler) factory.getScheduler();
|
||||
|
||||
scheduler.getContext();
|
||||
}
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
scheduler.shutdown();
|
||||
|
||||
|
||||
Thread.sleep(1000 * 1000);
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
public void testQuartz() throws Exception {
|
||||
Reference in New Issue
Block a user