From f0a9a2d89ecb53acf8d80691da3fb9532abf3aa0 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 20 Jul 2021 10:33:38 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20fix:=20Jenkins=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=9C=89=E5=A4=B1=E8=B4=A5=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E7=9A=84=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=97=B6Jenkins?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E4=BC=9A=E4=B8=80=E7=9B=B4=E6=AD=BB=E5=BE=AA?= =?UTF-8?q?=E7=8E=AF=20#4809=20#4810=20#4826=20This=20reverts=20commit=20a?= =?UTF-8?q?981cc1a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/api/dto/definition/request/MsThreadGroup.java | 2 +- .../io/metersphere/track/controller/TestPlanController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java index 240a2783bb..3e194c35dd 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java @@ -66,7 +66,7 @@ public class MsThreadGroup extends MsTestElement { threadGroup.setDuration(0); threadGroup.setProperty(ThreadGroup.ON_SAMPLE_ERROR, ThreadGroup.ON_SAMPLE_ERROR_CONTINUE); threadGroup.setScheduler(false); - if (onSampleError != null && onSampleError) { // onSampleError 为true 表示失败停止 + if (onSampleError != null && !onSampleError) { threadGroup.setProperty("ThreadGroup.on_sample_error", "stoptest"); } threadGroup.setSamplerController(loopController); diff --git a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java index fd7ec58b73..79908bffc5 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java @@ -157,7 +157,7 @@ public class TestPlanController { ApiRunConfigDTO api = new ApiRunConfigDTO(); api.setMode(testplanRunRequest.getMode()); api.setResourcePoolId(testplanRunRequest.getResourcePoolId()); - api.setOnSampleError(false); // OnSampleError 为false表示失败不停止,若设置为true会导致bug #4809 + api.setOnSampleError(true); api.setReportType("iddReport"); String apiRunConfig = JSONObject.toJSONString(api); return testPlanService.run(testplanRunRequest.getTestPlanId(), testplanRunRequest.getProjectId(), testplanRunRequest.getUserId(), testplanRunRequest.getTriggerMode(), apiRunConfig);