Revert fix: Jenkins插件执行有失败用例的测试计划时Jenkins插件会一直死循环 #4809 #4810 #4826

This reverts commit a981cc1a
This commit is contained in:
fit2-zhao 2021-07-20 10:33:38 +08:00 committed by fit2-zhao
parent aefab58482
commit f0a9a2d89e
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);