refactor(接口测试): 批量编辑定时任务增加Corn表达式的非空验证
This commit is contained in:
parent
dff9290030
commit
ed98065194
|
@ -2559,6 +2559,9 @@ public class ApiScenarioService extends MoveNodeService {
|
|||
if (StringUtils.isBlank(request.getCron()) && request.getConfig() == null) {
|
||||
this.batchUpdateSchedule(apiScenarios, request.isEnable(), operator);
|
||||
} else {
|
||||
if (StringUtils.isBlank(request.getCron())) {
|
||||
throw new MSException("Cron can not be null");
|
||||
}
|
||||
apiScenarios.forEach(apiScenario -> {
|
||||
ScheduleConfig scheduleConfig = ScheduleConfig.builder()
|
||||
.resourceId(apiScenario.getId())
|
||||
|
|
|
@ -46,6 +46,9 @@ public class TestPlanScheduleService {
|
|||
scheduleService.updateIfExist(testPlan.getId(), request.isEnable(), TestPlanScheduleJob.getJobKey(testPlan.getId()),
|
||||
TestPlanScheduleJob.getTriggerKey(testPlan.getId()), TestPlanScheduleJob.class, operator);
|
||||
} else {
|
||||
if (StringUtils.isBlank(request.getCron())) {
|
||||
throw new MSException("Cron can not be null");
|
||||
}
|
||||
ScheduleConfig scheduleConfig = ScheduleConfig.builder()
|
||||
.resourceId(testPlan.getId())
|
||||
.key(testPlan.getId())
|
||||
|
|
Loading…
Reference in New Issue