github-advanced-security[bot] commented on code in PR #15305:
URL: https://github.com/apache/druid/pull/15305#discussion_r1383751923


##########
server/src/test/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinatorTest.java:
##########
@@ -1062,6 +1064,201 @@
     ).containsOnlyOnce(defaultSegment3);
   }
 
+  @Test
+  public void testRetrieveUsedSegmentsUsingMultipleIntervals() throws 
IOException
+  {
+    final List<DataSegment> segments = createAndGetUsedYearSegments(1900, 
2133);
+    final List<Interval> intervals = 
segments.stream().map(DataSegment::getInterval).collect(Collectors.toList());
+
+    final Collection<DataSegment> actualUsedSegments = 
coordinator.retrieveUsedSegmentsForIntervals(
+        DS.WIKI,
+        intervals,
+        Segments.ONLY_VISIBLE
+    );
+
+    Assert.assertEquals(segments.size(), actualUsedSegments.size());
+    Assert.assertTrue(actualUsedSegments.containsAll(segments));
+  }
+
+  @Test
+  public void testRetrieveAllUsedSegmentsUsingIntervalsOutOfRange() throws 
IOException
+  {
+    final List<DataSegment> segments = createAndGetUsedYearSegments(1905, 
1910);

Review Comment:
   ## Unread local variable
   
   Variable 'List<DataSegment> segments' is never read.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/5962)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to