Skip to content

Commit

Permalink
Fix Non-determinstic Test SchemaFetchScanOperatorTest#testSchemaFetch…
Browse files Browse the repository at this point in the history
…Result
  • Loading branch information
mohitbadve committed Nov 5, 2024
1 parent ac43165 commit 002190b
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ public void testSchemaFetchResult() throws Exception {
Pair<List<MeasurementPath>, 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<String> expectedPath = Arrays.asList("root.sg.d1.s2", "root.sg.d2.a.s2", "root.sg.d2.s2");
List<String> 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 {
Expand Down

0 comments on commit 002190b

Please sign in to comment.