From 5fe21e9a71d2a464fe145a3b12eb8b2bb78b1dc5 Mon Sep 17 00:00:00 2001 From: "song.tianyang" Date: Wed, 27 Jan 2021 12:48:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E5=85=B3=E9=97=AD=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决测试计划定时任务关闭异常的问题 --- .../metersphere/api/service/ApiAutomationService.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index a8a190bf6e7a..c015d4c19b62 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -27,6 +27,7 @@ import io.metersphere.commons.utils.*; import io.metersphere.i18n.Translator; import io.metersphere.job.sechedule.ApiScenarioTestJob; +import io.metersphere.job.sechedule.TestPlanTestJob; import io.metersphere.service.ScheduleService; import io.metersphere.track.dto.TestPlanDTO; import io.metersphere.track.request.testcase.ApiCaseRelevanceRequest; @@ -630,8 +631,14 @@ public void updateSchedule(Schedule request) { } private void addOrUpdateApiScenarioCronJob(Schedule request) { - scheduleService.addOrUpdateCronJob( - request, ApiScenarioTestJob.getJobKey(request.getResourceId()), ApiScenarioTestJob.getTriggerKey(request.getResourceId()), ApiScenarioTestJob.class); + if(StringUtils.equals(request.getGroup(),ScheduleGroup.TEST_PLAN_TEST.name())){ + scheduleService.addOrUpdateCronJob( + request, TestPlanTestJob.getJobKey(request.getResourceId()), TestPlanTestJob.getTriggerKey(request.getResourceId()), TestPlanTestJob.class); + }else{ + scheduleService.addOrUpdateCronJob( + request, ApiScenarioTestJob.getJobKey(request.getResourceId()), ApiScenarioTestJob.getTriggerKey(request.getResourceId()), ApiScenarioTestJob.class); + } + } public JmxInfoDTO genPerformanceTestJmx(RunScenarioRequest request) throws Exception { From af69dfe7bac396817c647965c0f4653e735bc66d Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 27 Jan 2021 12:48:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=94=B9=E5=8F=98?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=BA=90=E7=8A=B6=E6=80=81=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/xpack | 2 +- frontend/src/business/components/xpack | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 792ace0c68d2..e7b5f78a6b0e 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 792ace0c68d2b4ff42a74d8e6df32ca7f290ca1c +Subproject commit e7b5f78a6b0e4f2e3e1e767cd57d3e5e5c1697b2 diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 416645a24d94..b176a4de4151 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 416645a24d941eb9727c07c19be70422c2e66cc7 +Subproject commit b176a4de415142490e098e71e1ee6533a346f0bb From 15f4489cf2a6955f4413e3dae090c1dbd7bf7da0 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 27 Jan 2021 13:10:57 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Missing=20URI?= =?UTF-8?q?=20template=20variable=20'a'=20for=20method=20parameter=20of=20?= =?UTF-8?q?type=20String?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/xpack | 2 +- frontend/src/business/components/xpack | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index e7b5f78a6b0e..bb9c0309161c 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit e7b5f78a6b0e4f2e3e1e767cd57d3e5e5c1697b2 +Subproject commit bb9c0309161c91bf7d0a9f85cc44bc0eb0fc11ac diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index b176a4de4151..3a3363c7d651 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit b176a4de415142490e098e71e1ee6533a346f0bb +Subproject commit 3a3363c7d651f340cc37fca74c1edb92af484915