|
|
@ -2,23 +2,21 @@ package com.xxl.job.executor.test;
|
|
|
|
|
|
|
|
|
|
|
|
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.boot.test.context.SpringBootTest;
|
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
|
|
|
|
|
|
import com.infincash.cron.collection.CronJobHandler;
|
|
|
|
|
|
|
|
import com.xxl.job.executor.Application;
|
|
|
|
import com.xxl.job.executor.Application;
|
|
|
|
|
|
|
|
|
|
|
|
@RunWith(SpringRunner.class)
|
|
|
|
@RunWith(SpringRunner.class)
|
|
|
|
@SpringBootTest(classes = Application.class ,webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT)
|
|
|
|
@SpringBootTest(classes = Application.class ,webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT)
|
|
|
|
public class XxlJobExecutorExampleBootApplicationTests {
|
|
|
|
public class XxlJobExecutorExampleBootApplicationTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
// @Autowired
|
|
|
|
CronJobHandler jobHandler;
|
|
|
|
// CronJobHandler jobHandler;
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void test() throws Exception {
|
|
|
|
public void test() throws Exception {
|
|
|
|
jobHandler.execute("");
|
|
|
|
// jobHandler.execute("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|