fix(性能测试): 修复添加了自定义参数后不能下载zip的问题

--bug=1024725 --user=刘瑞斌 【性能测试】github#22996,性能测试高级配置添加自定义变量后,性能测试执行一直starting,删除自定义变量后可以正常执行 https://www.tapd.cn/55049933/s/1354058

Closes #22996
This commit is contained in:
CaptainB 2023-03-21 20:25:51 +08:00 committed by 刘瑞斌
parent 53ae68f810
commit e1cc70d070
1 changed files with 3 additions and 4 deletions

View File

@ -3,7 +3,6 @@ package io.metersphere.parse.xml.reader;
import io.metersphere.base.domain.TestResourcePool;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.CommonBeanFactory;
import io.metersphere.commons.utils.JSON;
import io.metersphere.config.KafkaProperties;
import io.metersphere.engine.EngineContext;
import io.metersphere.i18n.Translator;
@ -323,7 +322,7 @@ public class JmeterDocumentParser implements EngineSourceParser {
}
private void processCheckoutResponseAssertion(Element element) {
if (context.getProperty("statusCode") == null || JSON.parseArray(context.getProperty("statusCode").toString()).size() == 0) {
if (context.getProperty("statusCode") == null || ((List) context.getProperty("statusCode")).size() == 0) {
return;
}
Element hashTree = getNextSibling(element);
@ -375,7 +374,7 @@ public class JmeterDocumentParser implements EngineSourceParser {
}
private void processCheckoutArguments(Element ele) {
if (context.getProperty("params") == null || JSON.parseArray(context.getProperty("params").toString()).size() == 0) {
if (context.getProperty("params") == null || ((List) context.getProperty("params")).size() == 0) {
return;
}
Element hashTree = getNextSibling(ele);
@ -495,7 +494,7 @@ public class JmeterDocumentParser implements EngineSourceParser {
Object params = context.getProperty("params");
if (params instanceof List) {
for (Object p : (List) params) {
Map jsonObject = JSON.parseObject(p.toString(), Map.class);
Map jsonObject = (Map) p;
if (!(boolean) jsonObject.get("enable")) {
continue;
}