fix(接口测试): 修复执行完成后特殊数据导致更新环境错误
#不知道怎么复现,可以找我拿文件,凯波提供的,没issues和tapd
This commit is contained in:
parent
4f1053728e
commit
66353f62cb
|
@ -128,9 +128,15 @@ public class ApiEnvironmentRunningParamService {
|
||||||
for (String env : envStringArr) {
|
for (String env : envStringArr) {
|
||||||
if (StringUtils.contains(env, "=")) {
|
if (StringUtils.contains(env, "=")) {
|
||||||
String[] envItem = env.split("=");
|
String[] envItem = env.split("=");
|
||||||
|
if (ArrayUtils.isEmpty(envItem)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
String jmeterVarKey = envItem[0];
|
String jmeterVarKey = envItem[0];
|
||||||
if (this.checkValidity(jmeterVarKey, "MS.ENV.")) {
|
if (this.checkValidity(jmeterVarKey, "MS.ENV.")) {
|
||||||
String[] envAndKeyArr = jmeterVarKey.substring("MS.ENV.".length()).split("\\.");
|
String[] envAndKeyArr = jmeterVarKey.substring("MS.ENV.".length()).split("\\.");
|
||||||
|
if (ArrayUtils.isEmpty(envAndKeyArr)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
String envId = envAndKeyArr[0];
|
String envId = envAndKeyArr[0];
|
||||||
String[] keyArr = ArrayUtils.remove(envAndKeyArr, 0);
|
String[] keyArr = ArrayUtils.remove(envAndKeyArr, 0);
|
||||||
String key = StringUtils.join(keyArr, ".");
|
String key = StringUtils.join(keyArr, ".");
|
||||||
|
@ -158,8 +164,12 @@ public class ApiEnvironmentRunningParamService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void parseEnvironment(List<String> evnStrList) {
|
public void parseEnvironment(List<String> evnStrList) {
|
||||||
for (String evnStr : evnStrList) {
|
try {
|
||||||
this.parseEvn(evnStr);
|
for (String evnStr : evnStrList) {
|
||||||
|
this.parseEvn(evnStr);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
LoggerUtil.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue