From 13bf6532d3bdbc39e7330436acda935f1ee28214 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Thu, 20 Apr 2023 14:37:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1=E7=9A=84=E9=85=8D=E7=BD=AE=E5=8F=AF?= =?UTF-8?q?=E8=A7=81=E9=A1=B9=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1025626 --user=宋天阳 【测试跟踪】测试计划中只有ui测试用例-定时任务设置-其它配置显示资源池设置 https://www.tapd.cn/55049933/s/1364753 --- .../commons/utils/HashTreeUtil.java | 6 +++--- .../service/BaseEnvironmentService.java | 2 +- .../reportstatistics/utils/ChromeUtil.java | 4 ++-- .../plan/service/TestPlanService.java | 6 +++--- .../plan/components/ScheduleMaintain.vue | 18 +++++++++--------- .../business/plan/components/TestPlanList.vue | 4 +--- 6 files changed, 19 insertions(+), 21 deletions(-) diff --git a/api-test/backend/src/main/java/io/metersphere/commons/utils/HashTreeUtil.java b/api-test/backend/src/main/java/io/metersphere/commons/utils/HashTreeUtil.java index a622912c1d..8f8b5f56ae 100644 --- a/api-test/backend/src/main/java/io/metersphere/commons/utils/HashTreeUtil.java +++ b/api-test/backend/src/main/java/io/metersphere/commons/utils/HashTreeUtil.java @@ -98,7 +98,7 @@ public class HashTreeUtil { return returnMap; } - public synchronized Map> getEnvParamsMapByHashTree(HashTree hashTree) { + public Map> getEnvParamsMapByHashTree(HashTree hashTree) { Map> returnMap = new HashMap<>(); if (hashTree != null) { for (Object hashTreeKey : hashTree.keySet()) { @@ -116,8 +116,8 @@ public class HashTreeUtil { JSR223Sampler processor = (JSR223Sampler) hashTreeKey; scriptValue = processor.getPropertyAsString(SCRIPT); } - } catch (Exception ignored) { - LogUtil.error(ignored); + } catch (Exception e) { + LogUtil.error(e); } if (StringUtils.isNotEmpty(scriptValue)) { diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java index 341944d400..206a3ff527 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java @@ -531,7 +531,7 @@ public class BaseEnvironmentService extends NodeTreeService { return baseApiTestEnvironmentMapper.selectNameById(id); } - public synchronized ApiTestEnvironmentWithBLOBs getMockEnvironmentByProjectId(String projectId) { + public ApiTestEnvironmentWithBLOBs getMockEnvironmentByProjectId(String projectId) { SystemParameterService systemParameterService = CommonBeanFactory.getBean(SystemParameterService.class); BaseSystemConfigDTO baseSystemConfigDTO = systemParameterService.getBaseInfo(); diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/utils/ChromeUtil.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/utils/ChromeUtil.java index 8943985821..a4b8bd39fb 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/utils/ChromeUtil.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/utils/ChromeUtil.java @@ -22,7 +22,7 @@ public class ChromeUtil { return chromeUtils; } - private synchronized WebDriver genWebDriver(String seleniumUrl, String language) { + private WebDriver genWebDriver(String seleniumUrl, String language) { if (StringUtils.isEmpty(seleniumUrl)) { LogUtil.error("Headless request is null! " + seleniumUrl); return null; @@ -52,7 +52,7 @@ public class ChromeUtil { return driver; } - public synchronized Map getImageInfo(HeadlessRequest request, String langurage) { + public Map getImageInfo(HeadlessRequest request, String langurage) { Map returnMap = new HashMap<>(); if (request.isEmpty()) { return returnMap; diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java index ecc4d5b46e..9c065d01c0 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java @@ -160,7 +160,7 @@ public class TestPlanService { @Resource private ApiPoolDebugService apiPoolDebugService; - public synchronized TestPlan addTestPlan(AddTestPlanRequest testPlan) { + public TestPlan addTestPlan(AddTestPlanRequest testPlan) { if (getTestPlanByName(testPlan.getName()).size() > 0) { MSException.throwException(Translator.get("plan_name_already_exists")); } @@ -678,7 +678,7 @@ public class TestPlanService { } catch (Exception e) { sqlSession.rollback(); throw new RuntimeException(e); - }finally { + } finally { if (sqlSession != null && sqlSessionFactory != null) { SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory); } @@ -2009,7 +2009,7 @@ public class TestPlanService { //未勾选资源池运行时,将资源池ID赋空 runModeConfig.setResourcePoolId(null); } - + String apiRunConfig = JSON.toJSONString(runModeConfig); return this.runTestPlan(testPlanId, testplanRunRequest.getProjectId(), testplanRunRequest.getUserId(), testplanRunRequest.getTriggerMode(), testplanRunRequest.getReportId(), testplanRunRequest.getExecutionWay(), apiRunConfig); diff --git a/test-track/frontend/src/business/plan/components/ScheduleMaintain.vue b/test-track/frontend/src/business/plan/components/ScheduleMaintain.vue index 371a844198..6db030b2c7 100644 --- a/test-track/frontend/src/business/plan/components/ScheduleMaintain.vue +++ b/test-track/frontend/src/business/plan/components/ScheduleMaintain.vue @@ -86,12 +86,12 @@ {{ $t("run_mode.title") }}: {{ $t("run_mode.serial") }} - {{ - $t("run_mode.parallel") - }} + {{ $t("run_mode.parallel") }} + -
+
{{ $t("浏览器") }}:
- {{ - $t("api_test.fail_to_stop") - }} + {{ $t("api_test.fail_to_stop") }} +
-
+
-   +  
diff --git a/test-track/frontend/src/business/plan/components/TestPlanList.vue b/test-track/frontend/src/business/plan/components/TestPlanList.vue index 6fc96f9d64..ac129e962f 100644 --- a/test-track/frontend/src/business/plan/components/TestPlanList.vue +++ b/test-track/frontend/src/business/plan/components/TestPlanList.vue @@ -1059,9 +1059,7 @@ export default { async scheduleTask(row) { row.redirectFrom = "testPlan"; this.currentPlanId = row.id; - this.haveUIScenario().then(() => { - this.$refs.scheduleMaintain.open(row); - }); + this.$refs.scheduleMaintain.open(row); }, saveSortField(key, orders) { saveLastTableSortField(key, JSON.stringify(orders));