From 837a74d53dca2abd42ec7edd6b4596a2475c410a Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Tue, 25 Jun 2024 10:42:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E6=89=A7=E8=A1=8C=E5=AE=8C=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E5=88=86=E4=BA=AB=E9=93=BE=E6=8E=A5=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1042988 --user=陈建星 【接口测试】场景-执行场景成功,但是后台有错误日志 https://www.tapd.cn/55049933/s/1535948 --- .../api/service/definition/ApiTestCaseBatchRunService.java | 1 + .../metersphere/plan/service/TestPlanApiCaseBatchRunService.java | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseBatchRunService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseBatchRunService.java index fde1fd8561..e7594781d4 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseBatchRunService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseBatchRunService.java @@ -290,6 +290,7 @@ public class ApiTestCaseBatchRunService { TaskRequestDTO taskRequest = getTaskRequestDTO(reportId, apiTestCase, runModeConfig); taskRequest.getTaskInfo().setQueueId(queue.getQueueId()); + taskRequest.getTaskInfo().setUserId(queue.getUserId()); taskRequest.getTaskItem().setRequestCount(1L); apiExecuteService.execute(taskRequest); diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseBatchRunService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseBatchRunService.java index b7e3ea35cc..c47a3ab045 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseBatchRunService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseBatchRunService.java @@ -260,6 +260,7 @@ public class TestPlanApiCaseBatchRunService { TaskBatchRequestDTO taskRequest = getTaskBatchRequestDTO(projectId, runModeConfig); taskRequest.setTaskItems(taskItems); taskRequest.getTaskInfo().setParentQueueId(parentQueueId); + taskRequest.getTaskInfo().setUserId(userId); apiExecuteService.batchExecute(taskRequest); }