|
|
|
@ -17,12 +17,7 @@
|
|
|
|
|
|
|
|
|
|
package org.apache.dolphinscheduler.service.process; |
|
|
|
|
|
|
|
|
|
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING; |
|
|
|
|
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_PARAMS; |
|
|
|
|
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE; |
|
|
|
|
|
|
|
|
|
import static org.mockito.ArgumentMatchers.any; |
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.databind.JsonNode; |
|
|
|
|
import org.apache.dolphinscheduler.common.Constants; |
|
|
|
|
import org.apache.dolphinscheduler.common.enums.CommandType; |
|
|
|
|
import org.apache.dolphinscheduler.common.enums.Flag; |
|
|
|
@ -78,14 +73,6 @@ import org.apache.dolphinscheduler.plugin.task.api.model.ResourceInfo;
|
|
|
|
|
import org.apache.dolphinscheduler.service.exceptions.ServiceException; |
|
|
|
|
import org.apache.dolphinscheduler.service.quartz.cron.CronUtilsTest; |
|
|
|
|
import org.apache.dolphinscheduler.spi.params.base.FormType; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Collections; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
import org.junit.Assert; |
|
|
|
|
import org.junit.Rule; |
|
|
|
|
import org.junit.Test; |
|
|
|
@ -99,7 +86,17 @@ import org.powermock.reflect.Whitebox;
|
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.databind.JsonNode; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Collections; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING; |
|
|
|
|
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_PARAMS; |
|
|
|
|
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE; |
|
|
|
|
import static org.mockito.ArgumentMatchers.any; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* process service test |
|
|
|
@ -113,7 +110,7 @@ public class ProcessServiceTest {
|
|
|
|
|
public final ExpectedException exception = ExpectedException.none(); |
|
|
|
|
|
|
|
|
|
@InjectMocks |
|
|
|
|
private ProcessService processService; |
|
|
|
|
private ProcessServiceImpl processService; |
|
|
|
|
@Mock |
|
|
|
|
private CommandMapper commandMapper; |
|
|
|
|
@Mock |
|
|
|
@ -850,8 +847,8 @@ public class ProcessServiceTest {
|
|
|
|
|
int pageNumber = 0; |
|
|
|
|
int masterCount = 0; |
|
|
|
|
int thisMasterSlot = 2; |
|
|
|
|
List<Command> commandList = processService.findCommandPageBySlot(pageSize,pageNumber,masterCount,thisMasterSlot); |
|
|
|
|
Assert.assertEquals(0,commandList.size()); |
|
|
|
|
List<Command> commandList = processService.findCommandPageBySlot(pageSize, pageNumber, masterCount, thisMasterSlot); |
|
|
|
|
Assert.assertEquals(0, commandList.size()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private TaskGroupQueue getTaskGroupQueue() { |
|
|
|
|