From 94938efde6381916984482dc9a5d8ccd982bd664 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 12 Jan 2023 12:24:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF=E4=B8=8D=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=B7=A8=E9=A1=B9=E7=9B=AE=E7=94=A8=E4=BE=8B=E6=9C=AA=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=8E=AF=E5=A2=83=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/exec/scenario/ApiScenarioEnvService.java | 12 +++--------- .../plan/view/comonents/api/TestPlanApiCaseList.vue | 4 +--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java index 2b6fa4155d..b82474612d 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java @@ -74,14 +74,11 @@ public class ApiScenarioEnvService { List hasFullUrlList = new ArrayList<>(); for (MsTestElement testElement : hashTree) { this.formatElement(testElement, env, hasFullUrlList); - if (CollectionUtils.isNotEmpty(testElement.getHashTree()) && !hasFullUrlList.contains(false)) { + if (CollectionUtils.isNotEmpty(testElement.getHashTree())) { getHashTree(testElement.getHashTree(), env, hasFullUrlList); } - if (hasFullUrlList.contains(false)) { - env.setFullUrl(false); - break; - } } + env.setFullUrl(!hasFullUrlList.contains(false)); return env; } @@ -92,12 +89,9 @@ public class ApiScenarioEnvService { tree = tree.stream().filter(item -> item.isEnable()).collect(Collectors.toList()); for (MsTestElement element : tree) { this.formatElement(element, env, hasFullUrlList); - if (CollectionUtils.isNotEmpty(element.getHashTree()) && !hasFullUrlList.contains(false)) { + if (CollectionUtils.isNotEmpty(element.getHashTree())) { getHashTree(element.getHashTree(), env, hasFullUrlList); } - if (hasFullUrlList.contains(false)) { - break; - } } } catch (Exception e) { LogUtil.error(e); diff --git a/test-track/frontend/src/business/plan/view/comonents/api/TestPlanApiCaseList.vue b/test-track/frontend/src/business/plan/view/comonents/api/TestPlanApiCaseList.vue index b8e779a89d..1e1db96465 100644 --- a/test-track/frontend/src/business/plan/view/comonents/api/TestPlanApiCaseList.vue +++ b/test-track/frontend/src/business/plan/view/comonents/api/TestPlanApiCaseList.vue @@ -593,9 +593,7 @@ export default { // 这里先打开报告,建立 websock // 否则可能执行完了才建立 websock,拿不到结果 this.$refs.apiCaseResult.open(reportId); - setTimeout(() => { - run(row.id, reportId); - }, 3000); + run(row.id, reportId); }, handleTestEnd(reportId) { if (this.runningReport.has(reportId)) {