fix(性能测试): 修复按照迭代次数没有处理线程组禁用和删除的问题
This commit is contained in:
parent
74e1b0ce90
commit
9e7df30249
|
@ -967,6 +967,24 @@ public class JmeterDocumentParser implements DocumentParser {
|
|||
((List<?>) rampUps).remove(0);
|
||||
rampUp = o.toString();
|
||||
}
|
||||
Object deleteds = context.getProperty("deleted");
|
||||
String deleted = "false";
|
||||
if (deleteds instanceof List) {
|
||||
Object o = ((List<?>) deleteds).get(0);
|
||||
((List<?>) deleteds).remove(0);
|
||||
deleted = o.toString();
|
||||
}
|
||||
Object enableds = context.getProperty("enabled");
|
||||
String enabled = "true";
|
||||
if (enableds instanceof List) {
|
||||
Object o = ((List<?>) enableds).get(0);
|
||||
((List<?>) enableds).remove(0);
|
||||
enabled = o.toString();
|
||||
}
|
||||
threadGroup.setAttribute("enabled", enabled);
|
||||
if (BooleanUtils.toBoolean(deleted)) {
|
||||
threadGroup.setAttribute("enabled", "false");
|
||||
}
|
||||
Element elementProp = document.createElement("elementProp");
|
||||
elementProp.setAttribute("name", "ThreadGroup.main_controller");
|
||||
elementProp.setAttribute("elementType", "LoopController");
|
||||
|
|
Loading…
Reference in New Issue