From 002190b5040aba650ad178b4f4b04292420d62cb Mon Sep 17 00:00:00 2001 From: mohitbadve Date: Tue, 5 Nov 2024 13:08:39 -0600 Subject: [PATCH] Fix Non-determinstic Test SchemaFetchScanOperatorTest#testSchemaFetchResult --- .../operator/schema/SchemaFetchScanOperatorTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/schema/SchemaFetchScanOperatorTest.java b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/schema/SchemaFetchScanOperatorTest.java index 0aea68946028..fd510a22c070 100644 --- a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/schema/SchemaFetchScanOperatorTest.java +++ b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/schema/SchemaFetchScanOperatorTest.java @@ -97,9 +97,13 @@ public void testSchemaFetchResult() throws Exception { Pair, Integer> pair = schemaTree.searchMeasurementPaths(new PartialPath("root.sg.**.status"), 0, 0, false); Assert.assertEquals(3, pair.left.size()); - Assert.assertEquals( - Arrays.asList("root.sg.d1.s2", "root.sg.d2.a.s2", "root.sg.d2.s2"), - pair.left.stream().map(MeasurementPath::getFullPath).collect(Collectors.toList())); + List expectedPath = Arrays.asList("root.sg.d1.s2", "root.sg.d2.a.s2", "root.sg.d2.s2"); + List actualPath = + pair.left.stream().map(MeasurementPath::getFullPath).collect(Collectors.toList()); + Assert.assertTrue( + expectedPath.size() == actualPath.size() + && expectedPath.containsAll(actualPath) + && actualPath.containsAll(expectedPath)); } private ISchemaRegion mockSchemaRegion() throws Exception {