From 8bf9369d5d67e48c43263770cab0e94b73edf7a1 Mon Sep 17 00:00:00 2001 From: qzmo Date: Thu, 22 Aug 2024 20:44:46 +0800 Subject: [PATCH] fix: block plan production when no case found --- arex-schedule-web-api/pom.xml | 4 ++-- .../com/arextest/schedule/service/LocalReplayService.java | 3 ++- pom.xml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arex-schedule-web-api/pom.xml b/arex-schedule-web-api/pom.xml index d9607580..c8bb5bb1 100644 --- a/arex-schedule-web-api/pom.xml +++ b/arex-schedule-web-api/pom.xml @@ -136,7 +136,7 @@ arex-schedule-parent com.arextest - 1.2.14 + 1.2.15 @@ -338,5 +338,5 @@ - 1.2.14 + 1.2.15 \ No newline at end of file diff --git a/arex-schedule-web-api/src/main/java/com/arextest/schedule/service/LocalReplayService.java b/arex-schedule-web-api/src/main/java/com/arextest/schedule/service/LocalReplayService.java index 8e10bffa..a6ef8276 100644 --- a/arex-schedule-web-api/src/main/java/com/arextest/schedule/service/LocalReplayService.java +++ b/arex-schedule-web-api/src/main/java/com/arextest/schedule/service/LocalReplayService.java @@ -459,13 +459,14 @@ private Pair buildReplayPlan(BuildReplayPlanRequest return Pair.of(null, CommonResponse.badResponse("save replay action error, " + replayPlan, new BuildReplayPlanResponse(BuildReplayFailReasonEnum.DB_ERROR))); } - progressEvent.onReplayPlanCreated(replayPlan); planConsumePrepareService.preparePlan(replayPlan); if (replayPlan.getCaseTotalCount() == 0) { return Pair.of(null, CommonResponse.badResponse("No case found in selected range")); } + progressEvent.onReplayPlanCreated(replayPlan); + replayPlan.setExecutionContexts(planExecutionContextProvider.buildContext(replayPlan)); if (CollectionUtils.isEmpty(replayPlan.getExecutionContexts())) { replayPlan.setErrorMessage("Got empty execution context"); diff --git a/pom.xml b/pom.xml index 0fc97488..4bb99a04 100644 --- a/pom.xml +++ b/pom.xml @@ -320,5 +320,5 @@ https://github.com/arextest/arex-replay-schedule https://github.com/arextest/arex-replay-schedule - 1.2.14 + 1.2.15 \ No newline at end of file