解决测试计划性能测试相关bug

This commit is contained in:
liangdaliang
2025-05-28 13:54:43 +08:00
parent c71b9d8c63
commit 66c627d33a
2 changed files with 14 additions and 12 deletions

View File

@@ -284,9 +284,10 @@ public class JMeterGroupUtil {
if (executeType == 1) {
threadGroup.setDuration(pressureSecond);
threadGroup.setProperty(new TestElementProperty(ThreadGroup.MAIN_CONTROLLER, createLoopController(-1)));
threadGroup.setProperty(new StringProperty(ThreadGroup.SCHEDULER, "true"));
threadGroup.setProperty(new StringProperty(ThreadGroup.IS_SAME_USER_ON_NEXT_ITERATION, "true"));
threadGroup.setProperty(new BooleanProperty(ThreadGroup.IS_SAME_USER_ON_NEXT_ITERATION, true));
threadGroup.setScheduler(true);
} else {
threadGroup.setScheduler(false);
threadGroup.setProperty(new TestElementProperty(ThreadGroup.MAIN_CONTROLLER, createLoopController(loops)));
}
if (errorOperType == 1) {
@@ -300,7 +301,6 @@ public class JMeterGroupUtil {
} else if (errorOperType == 5) {
threadGroup.setProperty(new StringProperty(ThreadGroup.ON_SAMPLE_ERROR, "stoptestnow"));
}
threadGroup.setScheduler(false);
threadGroup.setProperty(TestElement.TEST_CLASS, ThreadGroup.class.getName());
threadGroup.setProperty(TestElement.GUI_CLASS, ThreadGroupGui.class.getName());
threadGroup.setProperty(new BooleanProperty(TestElement.ENABLED, true));