From 9e7df30249efff9e661baa3ec7319cf828881fa5 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 14 May 2021 15:12:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=89=E7=85=A7=E8=BF=AD=E4=BB=A3=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=E6=B2=A1=E6=9C=89=E5=A4=84=E7=90=86=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E7=BB=84=E7=A6=81=E7=94=A8=E5=92=8C=E5=88=A0=E9=99=A4=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xml/reader/jmx/JmeterDocumentParser.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java index 6e24915227..3ed8abf78e 100644 --- a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java +++ b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java @@ -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");