mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
fixed #815 添加一个Quartz的集成类及testcase
Signed-off-by: wendal <wendal1985@gmail.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.alibaba.druid.bvt.quartz;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.quartz.Scheduler;
|
||||
import org.quartz.impl.StdSchedulerFactory;
|
||||
|
||||
public class QuartzTest extends TestCase {
|
||||
|
||||
StdSchedulerFactory factory;
|
||||
Scheduler scheduler;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
Properties props = new Properties();
|
||||
props.load(getClass().getClassLoader().getResourceAsStream("bvt/quartz/quartz.properties"));
|
||||
factory = new StdSchedulerFactory(props);
|
||||
scheduler = factory.getScheduler();
|
||||
}
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
scheduler.shutdown();
|
||||
}
|
||||
|
||||
public void testQuartz() throws Exception {
|
||||
scheduler.start();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user