mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
升级spring boot后同步修改unit test
This commit is contained in:
parent
3466ff3f05
commit
ac2b28bb5f
@ -3,8 +3,8 @@ package tech.powerjob.server.core.evaluator;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.powerjob.common.serialize.JsonUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
@ -45,7 +45,7 @@ public class GroovyEvaluatorTest {
|
||||
@Test
|
||||
public void testSimpleEval1() {
|
||||
Object res = groovyEvaluator.evaluate("var x = false; x;", null);
|
||||
Assert.assertEquals(false, res);
|
||||
Assertions.assertEquals(false, res);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -53,14 +53,14 @@ public class GroovyEvaluatorTest {
|
||||
// inject simple context
|
||||
Object res = groovyEvaluator.evaluate("var res = context.k3; res;", SIMPLE_CONTEXT);
|
||||
Boolean s = JsonUtils.parseObjectUnsafe(res.toString(), Boolean.class);
|
||||
Assert.assertEquals(false, s);
|
||||
Assertions.assertEquals(false, s);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testSimpleEval3() {
|
||||
Object res = groovyEvaluator.evaluate("var res = new groovy.json.JsonSlurper().parseText(context.k3); res == false;", SIMPLE_CONTEXT);
|
||||
Assert.assertEquals(true, res);
|
||||
Assertions.assertEquals(true, res);
|
||||
}
|
||||
|
||||
|
||||
@ -68,13 +68,13 @@ public class GroovyEvaluatorTest {
|
||||
public void testComplexEval1() {
|
||||
// array
|
||||
Object res = groovyEvaluator.evaluate("var res = new groovy.json.JsonSlurper().parseText(context.array) ; res[0] == 1;", COMPLEX_CONTEXT);
|
||||
Assert.assertEquals(true, res);
|
||||
Assertions.assertEquals(true, res);
|
||||
// map
|
||||
res = groovyEvaluator.evaluate("var map = new groovy.json.JsonSlurper().parseText(context.map); var e1 = map.e1; e1.value ",COMPLEX_CONTEXT);
|
||||
Assert.assertEquals(1,res);
|
||||
Assertions.assertEquals(1,res);
|
||||
// object
|
||||
res = groovyEvaluator.evaluate("var e3 = new groovy.json.JsonSlurper().parseText(context.obj); var e1 = e3.sub.sub; e1.value ",COMPLEX_CONTEXT);
|
||||
Assert.assertEquals(1,res);
|
||||
Assertions.assertEquals(1,res);
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,8 +4,8 @@ import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import org.assertj.core.util.Lists;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.powerjob.common.OmsConstant;
|
||||
import tech.powerjob.server.core.scheduler.auxiliary.impl.CronTimingStrategyHandler;
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
package tech.powerjob.server.core.scheduler;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.powerjob.common.enums.TimeExpressionType;
|
||||
import tech.powerjob.common.exception.PowerJobException;
|
||||
import tech.powerjob.server.core.scheduler.auxiliary.TimingStrategyHandler;
|
||||
@ -37,11 +36,11 @@ public class TimingStrategyServiceTest {
|
||||
// api
|
||||
Assertions.assertDoesNotThrow(() -> timingStrategyService.validate(TimeExpressionType.API, "", null, null));
|
||||
List<String> triggerTimes = timingStrategyService.calculateNextTriggerTimes(TimeExpressionType.API, "", null, null);
|
||||
Assert.assertEquals(1, triggerTimes.size());
|
||||
Assertions.assertEquals(1, triggerTimes.size());
|
||||
// workflow
|
||||
Assertions.assertDoesNotThrow(() -> timingStrategyService.validate(TimeExpressionType.WORKFLOW, "", null, null));
|
||||
triggerTimes = timingStrategyService.calculateNextTriggerTimes(TimeExpressionType.WORKFLOW, "", null, null);
|
||||
Assert.assertEquals(1, triggerTimes.size());
|
||||
Assertions.assertEquals(1, triggerTimes.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -54,12 +53,12 @@ public class TimingStrategyServiceTest {
|
||||
|
||||
long timeParam = 1000;
|
||||
List<String> triggerTimes = timingStrategyService.calculateNextTriggerTimes(TimeExpressionType.FIXED_RATE, String.valueOf(timeParam), null, null);
|
||||
Assert.assertEquals(5, triggerTimes.size());
|
||||
Assertions.assertEquals(5, triggerTimes.size());
|
||||
|
||||
Long startTime = System.currentTimeMillis() + timeParam;
|
||||
Long endTime = System.currentTimeMillis() + timeParam * 3;
|
||||
triggerTimes = timingStrategyService.calculateNextTriggerTimes(TimeExpressionType.FIXED_RATE, String.valueOf(timeParam), startTime, endTime);
|
||||
Assert.assertEquals(3, triggerTimes.size());
|
||||
Assertions.assertEquals(3, triggerTimes.size());
|
||||
|
||||
}
|
||||
|
||||
@ -72,7 +71,7 @@ public class TimingStrategyServiceTest {
|
||||
Assertions.assertDoesNotThrow(() -> timingStrategyService.validate(TimeExpressionType.FIXED_DELAY, "10000", null, null));
|
||||
|
||||
List<String> triggerTimes = timingStrategyService.calculateNextTriggerTimes(TimeExpressionType.FIXED_DELAY, "1", null, null);
|
||||
Assert.assertEquals(1, triggerTimes.size());
|
||||
Assertions.assertEquals(1, triggerTimes.size());
|
||||
}
|
||||
|
||||
|
||||
@ -86,6 +85,6 @@ public class TimingStrategyServiceTest {
|
||||
LocalDateTime start = LocalDateTime.of(2088, 5, 24, 7, 0, 0);
|
||||
LocalDateTime end = LocalDateTime.of(2088, 7, 12, 7, 0, 0);
|
||||
List<String> triggerTimes = timingStrategyService.calculateNextTriggerTimes(TimeExpressionType.CRON, "0 0 7 8-14,22-28 * 2", start.toEpochSecond(ZoneOffset.of("+8")) * 1000, end.toEpochSecond(ZoneOffset.of("+8")) * 1000);
|
||||
Assert.assertNotNull(triggerTimes);
|
||||
Assertions.assertNotNull(triggerTimes);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package tech.powerjob.server.core.validator;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import tech.powerjob.common.enums.WorkflowNodeType;
|
||||
@ -41,7 +41,7 @@ class NodeValidatorTest {
|
||||
final WorkflowNodeInfoDO workflowNodeInfo1 = new WorkflowNodeInfoDO();
|
||||
BeanUtils.copyProperties(node1, workflowNodeInfo1);
|
||||
workflowNodeInfo1.setId(node1.getNodeId());
|
||||
Assert.assertThrows(PowerJobException.class, () -> decisionNodeValidator.complexValidate(workflowNodeInfo1, dag));
|
||||
Assertions.assertThrows(PowerJobException.class, () -> decisionNodeValidator.complexValidate(workflowNodeInfo1, dag));
|
||||
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ package tech.powerjob.server.test;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.powerjob.common.utils.CommonUtils;
|
||||
import tech.powerjob.server.core.uid.SnowFlakeIdGenerator;
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
package tech.powerjob.server.test;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.powerjob.common.enums.InstanceStatus;
|
||||
import tech.powerjob.common.model.PEWorkflowDAG;
|
||||
import tech.powerjob.server.core.workflow.algorithm.WorkflowDAGUtils;
|
||||
import tech.powerjob.server.core.workflow.algorithm.WorkflowDAG;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@ -32,7 +32,7 @@ public class DAGTest {
|
||||
nodes.add(new PEWorkflowDAG.Node(2L));
|
||||
edges.add(new PEWorkflowDAG.Edge(1L, 2L));
|
||||
edges.add(new PEWorkflowDAG.Edge(2L, 1L));
|
||||
Assert.assertFalse(WorkflowDAGUtils.valid(new PEWorkflowDAG(nodes, edges)));
|
||||
Assertions.assertFalse(WorkflowDAGUtils.valid(new PEWorkflowDAG(nodes, edges)));
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -51,14 +51,14 @@ public class DAGTest {
|
||||
edges.add(new PEWorkflowDAG.Edge(3L, 4L));
|
||||
|
||||
PEWorkflowDAG validPEDAG = new PEWorkflowDAG(nodes, edges);
|
||||
Assert.assertTrue(WorkflowDAGUtils.valid(validPEDAG));
|
||||
Assertions.assertTrue(WorkflowDAGUtils.valid(validPEDAG));
|
||||
|
||||
WorkflowDAG wfDAG = WorkflowDAGUtils.convert(validPEDAG);
|
||||
|
||||
Assert.assertEquals(1, wfDAG.getRoots().size());
|
||||
Assertions.assertEquals(1, wfDAG.getRoots().size());
|
||||
WorkflowDAG.Node node = wfDAG.getNode(3L);
|
||||
Assert.assertEquals(1, (long) node.getDependencies().get(0).getNodeId());
|
||||
Assert.assertEquals(4, (long) node.getSuccessors().get(0).getNodeId());
|
||||
Assertions.assertEquals(1, (long) node.getDependencies().get(0).getNodeId());
|
||||
Assertions.assertEquals(4, (long) node.getSuccessors().get(0).getNodeId());
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -76,7 +76,7 @@ public class DAGTest {
|
||||
edges.add(new PEWorkflowDAG.Edge(2L, 4L));
|
||||
|
||||
PEWorkflowDAG multiRootPEDAG = new PEWorkflowDAG(nodes, edges);
|
||||
Assert.assertTrue(WorkflowDAGUtils.valid(multiRootPEDAG));
|
||||
Assertions.assertTrue(WorkflowDAGUtils.valid(multiRootPEDAG));
|
||||
WorkflowDAG multiRootDAG = WorkflowDAGUtils.convert(multiRootPEDAG);
|
||||
System.out.println(multiRootDAG);
|
||||
}
|
||||
@ -100,7 +100,7 @@ public class DAGTest {
|
||||
edges.add(new PEWorkflowDAG.Edge(3L, 1L));
|
||||
edges.add(new PEWorkflowDAG.Edge(2L, 4L));
|
||||
|
||||
Assert.assertFalse(WorkflowDAGUtils.valid(new PEWorkflowDAG(nodes, edges)));
|
||||
Assertions.assertFalse(WorkflowDAGUtils.valid(new PEWorkflowDAG(nodes, edges)));
|
||||
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ public class DAGTest {
|
||||
edges.add(new PEWorkflowDAG.Edge(1L, 6L));
|
||||
|
||||
|
||||
Assert.assertTrue(WorkflowDAGUtils.valid(new PEWorkflowDAG(nodes, edges)));
|
||||
Assertions.assertTrue(WorkflowDAGUtils.valid(new PEWorkflowDAG(nodes, edges)));
|
||||
|
||||
}
|
||||
|
||||
@ -178,9 +178,9 @@ public class DAGTest {
|
||||
List<Long> readyNodeIds1 = WorkflowDAGUtils.listReadyNodes(dag1).stream().map(PEWorkflowDAG.Node::getNodeId).collect(Collectors.toList());
|
||||
|
||||
System.out.println(readyNodeIds1);
|
||||
Assert.assertTrue(readyNodeIds1.contains(1L));
|
||||
Assert.assertTrue(readyNodeIds1.contains(4L));
|
||||
Assert.assertTrue(readyNodeIds1.contains(9L));
|
||||
Assertions.assertTrue(readyNodeIds1.contains(1L));
|
||||
Assertions.assertTrue(readyNodeIds1.contains(4L));
|
||||
Assertions.assertTrue(readyNodeIds1.contains(9L));
|
||||
|
||||
}
|
||||
|
||||
@ -215,8 +215,8 @@ public class DAGTest {
|
||||
|
||||
System.out.println(readyNodeIds2);
|
||||
|
||||
Assert.assertEquals(1, readyNodeIds2.size());
|
||||
Assert.assertTrue(readyNodeIds2.contains(3L));
|
||||
Assertions.assertEquals(1, readyNodeIds2.size());
|
||||
Assertions.assertTrue(readyNodeIds2.contains(3L));
|
||||
|
||||
}
|
||||
|
||||
@ -256,9 +256,9 @@ public class DAGTest {
|
||||
|
||||
System.out.println(readyNodeIds2);
|
||||
|
||||
Assert.assertEquals(2, readyNodeIds2.size());
|
||||
Assert.assertTrue(readyNodeIds2.contains(4L));
|
||||
Assert.assertTrue(readyNodeIds2.contains(7L));
|
||||
Assertions.assertEquals(2, readyNodeIds2.size());
|
||||
Assertions.assertTrue(readyNodeIds2.contains(4L));
|
||||
Assertions.assertTrue(readyNodeIds2.contains(7L));
|
||||
|
||||
}
|
||||
|
||||
@ -299,8 +299,8 @@ public class DAGTest {
|
||||
|
||||
System.out.println(readyNodeIds2);
|
||||
|
||||
Assert.assertEquals(1, readyNodeIds2.size());
|
||||
Assert.assertTrue(readyNodeIds2.contains(5L));
|
||||
Assertions.assertEquals(1, readyNodeIds2.size());
|
||||
Assertions.assertTrue(readyNodeIds2.contains(5L));
|
||||
|
||||
}
|
||||
|
||||
@ -344,9 +344,9 @@ public class DAGTest {
|
||||
|
||||
System.out.println(readyNodeIds2);
|
||||
|
||||
Assert.assertEquals(2, readyNodeIds2.size());
|
||||
Assert.assertTrue(readyNodeIds2.contains(5L));
|
||||
Assert.assertTrue(readyNodeIds2.contains(7L));
|
||||
Assertions.assertEquals(2, readyNodeIds2.size());
|
||||
Assertions.assertTrue(readyNodeIds2.contains(5L));
|
||||
Assertions.assertTrue(readyNodeIds2.contains(7L));
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package tech.powerjob.server.test;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import tech.powerjob.server.extension.defaultimpl.alarm.impl.DingTalkUtils;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@ -19,14 +19,17 @@ public class DingTalkTest {
|
||||
private static final DingTalkUtils dingTalkUtils = new DingTalkUtils("dingauqwkvxxnqskknfv", "XWrEPdAZMPgJeFtHuL0LH73LRj-74umF2_0BFcoXMfvnX0pCQvt0rpb1JOJU_HLl");
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testFetchUserId() throws Exception {
|
||||
/**
|
||||
System.out.println(dingTalkUtils.fetchUserIdByMobile("38353"));
|
||||
**/
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testSendMarkdown() throws Exception {
|
||||
/**
|
||||
String userId = "2159453017839770,1234";
|
||||
|
||||
List<DingTalkUtils.MarkdownEntity> mds = Lists.newLinkedList();
|
||||
@ -35,6 +38,7 @@ public class DingTalkTest {
|
||||
mds.add(new DingTalkUtils.MarkdownEntity("t3333","hahahahahahahha3"));
|
||||
|
||||
dingTalkUtils.sendMarkdownAsync("PowerJob AlarmService", mds, userId, AGENT_ID);
|
||||
**/
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,9 +1,8 @@
|
||||
package tech.powerjob.server.test;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.powerjob.server.persistence.mongodb.GridFsManager;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
@ -18,7 +17,6 @@ import java.io.IOException;
|
||||
* @author tjq
|
||||
* @since 2020/5/18
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class GridFsTest {
|
||||
|
||||
@ -26,30 +24,38 @@ public class GridFsTest {
|
||||
private GridFsManager gridFsManager;
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testStore() throws IOException {
|
||||
/**
|
||||
File file = new File("/Users/tjq/Desktop/DistributeCompute/oms-template-origin.zip");
|
||||
gridFsManager.store(file, "test", "test.zip");
|
||||
**/
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testDownload() throws IOException {
|
||||
/**
|
||||
File file = new File("/Users/tjq/Desktop/tmp/test-download.zip");
|
||||
gridFsManager.download(file, "test", "test.zip");
|
||||
**/
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testDelete() {
|
||||
/**
|
||||
gridFsManager.deleteBefore("fs", 0);
|
||||
**/
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testExists() {
|
||||
/**
|
||||
System.out.println(gridFsManager.exists("test", "test.zip"));
|
||||
System.out.println(gridFsManager.exists("test", "oms-sql.sql"));
|
||||
**/
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package tech.powerjob.server.test;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.powerjob.server.common.timewheel.HashedWheelTimer;
|
||||
import tech.powerjob.server.common.timewheel.TimerFuture;
|
||||
import tech.powerjob.server.common.timewheel.TimerTask;
|
||||
@ -7,7 +8,6 @@ import tech.powerjob.server.common.timewheel.holder.InstanceTimeWheelService;
|
||||
import com.google.common.base.Stopwatch;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
@ -1,12 +1,11 @@
|
||||
package tech.powerjob.server.test;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.powerjob.server.common.utils.OmsFileUtils;
|
||||
import tech.powerjob.server.persistence.mongodb.GridFsManager;
|
||||
import tech.powerjob.server.core.scheduler.CleanService;
|
||||
import com.mongodb.client.gridfs.model.GridFSFile;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
@ -25,9 +24,8 @@ import java.util.function.Consumer;
|
||||
* @since 2020/5/11
|
||||
*/
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
@Ignore
|
||||
@Disabled
|
||||
public class OmsLogTest {
|
||||
|
||||
@Resource
|
||||
|
@ -1,7 +1,7 @@
|
||||
package tech.powerjob.server.test;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.powerjob.common.PowerQuery;
|
||||
import tech.powerjob.common.response.JobInfoDTO;
|
||||
import tech.powerjob.server.core.service.JobService;
|
||||
@ -9,7 +9,6 @@ import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.assertj.core.util.Lists;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@ -24,7 +23,6 @@ import java.util.List;
|
||||
* @author tjq
|
||||
* @since 2021/1/16
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class QueryConvertUtilsTest {
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package tech.powerjob.server.test;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.test.annotation.Rollback;
|
||||
import tech.powerjob.common.enums.InstanceStatus;
|
||||
import tech.powerjob.common.enums.TimeExpressionType;
|
||||
@ -14,8 +15,6 @@ import tech.powerjob.server.persistence.remote.repository.JobInfoRepository;
|
||||
import tech.powerjob.server.persistence.remote.repository.OmsLockRepository;
|
||||
import tech.powerjob.server.persistence.remote.repository.WorkflowInstanceInfoRepository;
|
||||
import org.assertj.core.util.Lists;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -31,7 +30,6 @@ import java.util.List;
|
||||
* @since 2020/4/5
|
||||
*/
|
||||
//@ActiveProfiles("daily")
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class RepositoryTest {
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
package tech.powerjob.server.test;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.test.annotation.Rollback;
|
||||
import tech.powerjob.server.persistence.remote.model.ServerInfoDO;
|
||||
import tech.powerjob.server.persistence.remote.repository.ServerInfoRepository;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@ -23,7 +22,6 @@ import java.util.concurrent.ThreadLocalRandom;
|
||||
* @author tjq
|
||||
* @since 2021/2/21
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class ServerInfoServiceTest {
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
package tech.powerjob.server.test;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.powerjob.server.core.uid.IdGenerateService;
|
||||
import tech.powerjob.server.extension.LockService;
|
||||
import tech.powerjob.server.core.scheduler.CleanService;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@ -18,7 +17,6 @@ import javax.annotation.Resource;
|
||||
* @since 2020/4/2
|
||||
*/
|
||||
//@ActiveProfiles("daily")
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class ServiceTest {
|
||||
|
||||
|
@ -2,7 +2,7 @@ package tech.powerjob.server.test;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
Loading…
x
Reference in New Issue
Block a user