fix(接口定义): 修复包含后置脚本选择node执行报错的缺陷

--bug=1016665 --user=王孝刚 【测试跟踪】github#17752,接口带后置脚本,使用local资源池执行报错
https://www.tapd.cn/55049933/s/1241176
This commit is contained in:
wxg0103 2022-09-09 13:31:54 +08:00 committed by f2c-ci-robot[bot]
parent 6f25bbb90d
commit aa25c4817a
2 changed files with 1 additions and 3 deletions

View File

@ -6,7 +6,6 @@ import io.metersphere.api.dto.RunningParamKeys;
import io.metersphere.api.dto.definition.request.ParameterConfig;
import io.metersphere.api.dto.scenario.environment.EnvironmentConfig;
import io.metersphere.api.dto.shell.filter.ScriptFilter;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.plugin.core.MsParameter;
import io.metersphere.plugin.core.MsTestElement;
import lombok.Data;
@ -88,7 +87,6 @@ public class MsJSR223PostProcessor extends MsTestElement {
processor.setProperty("scriptLanguage", "rhino");
}
processor.setProperty("script", this.getScript());
processor.setProperty("projectId", StringUtils.isNotEmpty(this.getProjectId()) ? this.getProjectId() : SessionUtils.getCurrentProjectId());
final HashTree jsr223PostTree = tree.add(processor);
if (CollectionUtils.isNotEmpty(hashTree)) {
hashTree.forEach(el -> {

View File

@ -157,7 +157,7 @@ public class ApiExecutionQueueService {
queue.setRetryEnable(config.isRetryEnable());
queue.setRetryNumber(config.getRetryNum());
queue.setProjectIds(JSON.toJSONString(new ArrayList<>() {{
runMap.get(k).getProjectId();
this.add(runMap.get(k).getProjectId());
}}));
queueDetails.add(queue);
detailMap.put(k, queue.getId());