fix(接口测试): 修复场景后置脚本设置环境变量失败的缺陷
--bug=1026136 --user=王孝刚 【接口测试】场景后置脚本设置环境变量失败#24364也提了同类问题获取list失败 https://www.tapd.cn/55049933/s/1371292
This commit is contained in:
parent
738c01ecd4
commit
d559f5c489
|
@ -45,6 +45,9 @@ public class KafkaListenerTask implements Runnable {
|
|||
|
||||
}};
|
||||
|
||||
public static final String ENV = "ENV";
|
||||
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
@ -58,7 +61,9 @@ public class KafkaListenerTask implements Runnable {
|
|||
// 分三类存储
|
||||
Map<String, List<ResultDTO>> assortMap = new LinkedHashMap<>();
|
||||
// 携带结果
|
||||
if (CollectionUtils.isNotEmpty(dto.getRequestResults())) {
|
||||
if (CollectionUtils.isNotEmpty(dto.getRequestResults()) ||
|
||||
(MapUtils.isNotEmpty(dto.getArbitraryData()) &&
|
||||
dto.getArbitraryData().containsKey(ENV))) {
|
||||
String key = RUN_MODE_MAP.get(dto.getRunMode());
|
||||
if (assortMap.containsKey(key)) {
|
||||
assortMap.get(key).add(dto);
|
||||
|
@ -68,7 +73,6 @@ public class KafkaListenerTask implements Runnable {
|
|||
}});
|
||||
}
|
||||
}
|
||||
|
||||
if (MapUtils.isNotEmpty(assortMap)) {
|
||||
testResultService.batchSaveResults(assortMap);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue