fix(接口测试): 正则提取指定匹配结果设置超过整型上限报错

--bug=1037837 --user=陈建星 【接口测试】定义-API-用例tab-更新用例-后置-提取参数-正则-指定匹配输入一个极大的值(超出提取的list角标)提示异常 https://www.tapd.cn/55049933/s/1498052
This commit is contained in:
AgAngle 2024-04-16 14:23:13 +08:00 committed by Craftsman
parent 4a19233e9d
commit b0b68147d3
2 changed files with 5 additions and 3 deletions

View File

@ -45,10 +45,11 @@ public class ExtractPostProcessorConverter extends MsProcessorConverter<ExtractP
List<MsExtract> list = processor.getExtractors().stream()
.filter(extract -> StringUtils.equals(extract.getVariableType(), MsExtract.MsExtractType.ENVIRONMENT.name())
&& extract.isValid() && extract.getEnable()).toList();
if (CollectionUtils.isNotEmpty(list)) {
//需要生成一个后置脚本
ApiParamConfig apiParamConfig = (ApiParamConfig) config;
EnvironmentInfoDTO envConfig = apiParamConfig.getEnvConfig(processor.getProjectId());
if (CollectionUtils.isNotEmpty(list) && envConfig != null) {
//需要生成一个后置脚本
String envId = envConfig.getId();
JSR223PostProcessor jsr223PostProcessor = new JSR223PostProcessor();
jsr223PostProcessor.setName("Set Environment Variable");

View File

@ -79,6 +79,7 @@
v-model:model-value="expressionForm.resultMatchingRuleNum"
:default-value="1"
:min="1"
:max="2147483647"
:precision="0"
class="w-[80px]"
@blur="inputNotNull"