From 9df95878ccf960ca19272479b6d5fc9f4151b956 Mon Sep 17 00:00:00 2001
From: Nathan Mo <54135657+QizhengMo@users.noreply.github.com>
Date: Thu, 22 Aug 2024 20:49:21 +0800
Subject: [PATCH] fix: block plan production when no case found (#349)
---
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