From f7459c19f13727bffe1030ec4f6964129c251c34 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 16 Dec 2022 17:24:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E4=B8=AA=E5=88=AB=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=94=A8=E4=BE=8B=E6=89=A7=E8=A1=8C=E4=B8=80=E7=9B=B4?= =?UTF-8?q?=E8=BD=AC=E5=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1020841 --user=陈建星 【测试跟踪】github#20605,测试计划中执行某个case,一直在转圈 https://www.tapd.cn/55049933/s/1316462 --- .../components/response/RequestResultTail.vue | 3 +++ .../plan/view/comonents/api/TestPlanApiCaseList.vue | 12 +++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/api-test/frontend/src/business/definition/components/response/RequestResultTail.vue b/api-test/frontend/src/business/definition/components/response/RequestResultTail.vue index 4df31a87f8..14ffbb90da 100644 --- a/api-test/frontend/src/business/definition/components/response/RequestResultTail.vue +++ b/api-test/frontend/src/business/definition/components/response/RequestResultTail.vue @@ -65,6 +65,9 @@ export default { } else { this.$EventBus.$emit('API_TEST_ERROR', this.reportId); } + } else { + this.loading = true; + this.socketSync(); } }); } 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 0f3da83c37..fd63c10c68 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 @@ -511,13 +511,11 @@ export default { singleRun(row) { let reportId = getUUID().substring(0, 8); this.rowLoading = row.id; - run(row.id, reportId) - .then(() => { - this.runningReport.add(reportId); - this.$refs.apiCaseResult.open(reportId); - },error =>{ - this.rowLoading = ""; - }); + this.runningReport.add(reportId); + // 这里先打开报告,建立 websock + // 否则可能执行完了才建立 websock,拿不到结果 + this.$refs.apiCaseResult.open(reportId); + run(row.id, reportId); }, handleTestEnd(reportId) { if (this.runningReport.has(reportId)) {