From 584ffcb7353cbe5224675dac13cf5b062de2ab3b Mon Sep 17 00:00:00 2001 From: wangyu096 Date: Fri, 30 Jun 2023 20:12:53 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BD=9C=E4=B8=9A=E5=8C=85=E5=90=AB?= =?UTF-8?q?=E5=A4=A7=E9=87=8F=E4=B8=BB=E6=9C=BA=EF=BC=8C=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=AF=B7=E6=B1=82=E5=93=8D=E5=BA=94=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=BF=87=E9=95=BF=20#1697?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tencent/bk/job/common/util/CollectionUtilTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/commons/common-utils/src/test/java/com/tencent/bk/job/common/util/CollectionUtilTest.java b/src/backend/commons/common-utils/src/test/java/com/tencent/bk/job/common/util/CollectionUtilTest.java index cc4a44aabe..c5348903e0 100644 --- a/src/backend/commons/common-utils/src/test/java/com/tencent/bk/job/common/util/CollectionUtilTest.java +++ b/src/backend/commons/common-utils/src/test/java/com/tencent/bk/job/common/util/CollectionUtilTest.java @@ -104,7 +104,8 @@ void testPartitionList() { assertThat(partitionLists.get(1004)).hasSize(1); assertThat(partitionLists.get(1004).get(0)).isEqualTo("test2009"); - List mergedElements = partitionLists.stream().flatMap(Collection::stream).distinct().collect(Collectors.toList()); + List mergedElements = + partitionLists.stream().flatMap(Collection::stream).distinct().collect(Collectors.toList()); // 测试分区之后与原始的在数量上一致 assertThat(mergedElements).hasSize(2009); } @@ -167,7 +168,8 @@ void testPartitionHashSet() { assertThat(partitionLists.get(1)).hasSize(2); assertThat(partitionLists.get(1004)).hasSize(1); - List mergedElements = partitionLists.stream().flatMap(Collection::stream).distinct().collect(Collectors.toList()); + List mergedElements = + partitionLists.stream().flatMap(Collection::stream).distinct().collect(Collectors.toList()); // 测试分区之后与原始的在数量上一致 assertThat(mergedElements).hasSize(2009); }