diff --git a/arex-schedule-web-api/src/main/java/com/arextest/schedule/model/plan/BuildReplayPlanRequest.java b/arex-schedule-web-api/src/main/java/com/arextest/schedule/model/plan/BuildReplayPlanRequest.java index 8c5f2111..937f7bc7 100644 --- a/arex-schedule-web-api/src/main/java/com/arextest/schedule/model/plan/BuildReplayPlanRequest.java +++ b/arex-schedule-web-api/src/main/java/com/arextest/schedule/model/plan/BuildReplayPlanRequest.java @@ -31,7 +31,7 @@ public class BuildReplayPlanRequest { */ private Integer caseSourceType; - private int caseCountLimit; + private Integer caseCountLimit; /** * yyyy-MM-dd HH:mm:ss diff --git a/arex-schedule-web-api/src/main/java/com/arextest/schedule/service/PlanProduceService.java b/arex-schedule-web-api/src/main/java/com/arextest/schedule/service/PlanProduceService.java index cd8ea9dd..d8948872 100644 --- a/arex-schedule-web-api/src/main/java/com/arextest/schedule/service/PlanProduceService.java +++ b/arex-schedule-web-api/src/main/java/com/arextest/schedule/service/PlanProduceService.java @@ -233,7 +233,7 @@ public ReplayPlan build(BuildReplayPlanRequest request, PlanContext planContext) if (schedule != null) { replayPlan.setReplaySendMaxQps(schedule.getSendMaxQps()); } - if (request.getCaseCountLimit() <= 0) { + if (request.getCaseCountLimit() == null || request.getCaseCountLimit() <= 0) { replayPlan.setCaseCountLimit(OPERATION_MAX_CASE_COUNT); } else { replayPlan.setCaseCountLimit(request.getCaseCountLimit()); diff --git a/arex-schedule-web-api/src/main/java/com/arextest/schedule/web/controller/ReplayPlanController.java b/arex-schedule-web-api/src/main/java/com/arextest/schedule/web/controller/ReplayPlanController.java index ffb5fce5..59398d1e 100644 --- a/arex-schedule-web-api/src/main/java/com/arextest/schedule/web/controller/ReplayPlanController.java +++ b/arex-schedule-web-api/src/main/java/com/arextest/schedule/web/controller/ReplayPlanController.java @@ -64,6 +64,7 @@ public CommonResponse createPlanGet(@RequestParam(name = "appId") String appId, @RequestParam(name = "targetEnv") String targetEnv, @RequestParam(name = "caseSourceFrom", required = false) Long caseSourceFrom, @RequestParam(name = "caseSourceTo", required = false) Long caseSourceTo, + @RequestParam(name = "caseCountLimit", required = false) Integer caseCountLimit, @RequestParam(name = "planName", required = false) String planName, @RequestParam(name = "operationIds", required = false) List operationIds ) { @@ -74,6 +75,7 @@ public CommonResponse createPlanGet(@RequestParam(name = "appId") String appId, req.setReplayPlanType(BuildReplayPlanType.BY_APP_ID.getValue()); req.setOperator("Webhook"); req.setPlanName(planName); + req.setCaseCountLimit(caseCountLimit); // date Date dateFrom = Optional.ofNullable(caseSourceFrom).map(Date::new)