Skip to content

Commit

Permalink
fix(接口测试): 修复场景添加后置脚本不发通知的缺陷
Browse files Browse the repository at this point in the history
--bug=1026591 --user=王孝刚 【接口测试】接口自动化-场景内接口有一个前置脚本-添加一个后置脚本-未发送通知
https://www.tapd.cn/55049933/s/1377091
  • Loading branch information
wxg0103 authored and fit2-zhao committed May 30, 2023
1 parent 793c972 commit 59b9f18
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -872,14 +872,18 @@ private static void toList(JSONArray hashTree, List<String> scriptList, List<Str
}

public static boolean isSend(List<String> org, List<String> target) {
if (org.size() != target.size() && CollectionUtils.isEmpty(org)) {
if (org.size() != target.size()) {
if (CollectionUtils.isEmpty(target)) {
return false;
}
if (CollectionUtils.isEmpty(org)) {
return true;
}
return true;
}
if (org.size() != target.size() && CollectionUtils.isEmpty(target)) {
return false;
}
List<String> diff = org.stream()
.filter(s -> !target.contains(s))

List<String> diff = target.stream()
.filter(s -> !org.contains(s))
.collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(diff)) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,14 +756,18 @@ private static void toList(List<String> list, JSONObject configObj, String pre,
}

public static boolean isSend(List<String> orgList, List<String> targetList) {
if (orgList.size() != targetList.size() && CollectionUtils.isEmpty(orgList)) {
if (orgList.size() != targetList.size()) {
if (CollectionUtils.isEmpty(targetList)) {
return false;
}
if (CollectionUtils.isEmpty(orgList)) {
return true;
}
return true;
}
if (orgList.size() != targetList.size() && CollectionUtils.isEmpty(targetList)) {
return false;
}
List<String> diff = orgList.stream()
.filter(s -> !targetList.contains(s))

List<String> diff = targetList.stream()
.filter(s -> !orgList.contains(s))
.collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(diff)) {
return true;
Expand Down

0 comments on commit 59b9f18

Please sign in to comment.