Commit 7d5c2932 by zhouhaibao

[+]测试

1 parent abe3c645
package cn.com.glsx.cn.com.glsx.service; package cn.com.glsx.cn.com.glsx.service;
import cn.com.glsx.process.job.xxljob.XxlJobInfo;
import cn.com.glsx.process.job.xxljob.XxlJobUtil;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -16,6 +19,7 @@ import cn.hutool.json.JSONUtil; ...@@ -16,6 +19,7 @@ import cn.hutool.json.JSONUtil;
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Application.class) @SpringBootTest(classes = Application.class)
@Slf4j
public class TestSopService { public class TestSopService {
@Autowired @Autowired
...@@ -28,4 +32,17 @@ public class TestSopService { ...@@ -28,4 +32,17 @@ public class TestSopService {
System.out.println(JSONUtil.toJsonStr(sop)); System.out.println(JSONUtil.toJsonStr(sop));
} }
@Test
public void testXXL() {
XxlJobInfo jobInfo = new XxlJobInfo();
jobInfo.setExecutorParam("");
jobInfo.setJobDesc("jobName2");
jobInfo.setAuthor("admin");
jobInfo.setScheduleConf("0 0/8 * * * ?");
jobInfo.setExecutorHandler("demoJobHandler");
jobInfo.setBusKey("28");
String add = XxlJobUtil.add(jobInfo);
log.info("返回结果{}",add);
}
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!