Skip to content

Commit

Permalink
perf: 作业包含大量主机,执行作业请求响应时间过长 TencentBlueKing#1697
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu096 committed Jun 30, 2023
1 parent e56cab8 commit 584ffcb
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -104,7 +104,8 @@ void testPartitionList() {
assertThat(partitionLists.get(1004)).hasSize(1);
assertThat(partitionLists.get(1004).get(0)).isEqualTo("test2009");

List<String> mergedElements = partitionLists.stream().flatMap(Collection::stream).distinct().collect(Collectors.toList());
List<String> mergedElements =
partitionLists.stream().flatMap(Collection::stream).distinct().collect(Collectors.toList());
// 测试分区之后与原始的在数量上一致
assertThat(mergedElements).hasSize(2009);
}
Expand Down Expand Up @@ -167,7 +168,8 @@ void testPartitionHashSet() {
assertThat(partitionLists.get(1)).hasSize(2);
assertThat(partitionLists.get(1004)).hasSize(1);

List<String> mergedElements = partitionLists.stream().flatMap(Collection::stream).distinct().collect(Collectors.toList());
List<String> mergedElements =
partitionLists.stream().flatMap(Collection::stream).distinct().collect(Collectors.toList());
// 测试分区之后与原始的在数量上一致
assertThat(mergedElements).hasSize(2009);
}
Expand Down

0 comments on commit 584ffcb

Please sign in to comment.