kfaraz commented on code in PR #18195:
URL: https://github.com/apache/druid/pull/18195#discussion_r2196410194


##########
server/src/test/java/org/apache/druid/client/coordinator/CoordinatorClientImplTest.java:
##########
@@ -617,51 +617,50 @@ public void test_getAllUsedSegments_noParams() throws 
JsonProcessingException
   }
 
   @Test
-  public void test_getAllUsedSegments_excludeRealtimeSegments() throws 
JsonProcessingException
+  public void 
test_fetchAllUsedSegmentsWithOvershadowedStatus_filterByDataSource() throws 
Exception
   {
-    final List<DataSegment> segments = ImmutableList.of(SEGMENT1, SEGMENT2, 
SEGMENT3);
-
     serviceClient.expectAndRespond(
         new RequestBuilder(
             HttpMethod.GET,
-            "/druid/coordinator/v1/metadata/segments?includeOvershadowedStatus"
+            
"/druid/coordinator/v1/metadata/segments?includeOvershadowedStatus&includeRealtimeSegments&datasources=abc"
         ),
         HttpResponseStatus.OK,
         ImmutableMap.of(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON),
-        jsonMapper.writeValueAsBytes(segments)
+        jsonMapper.writeValueAsBytes(ImmutableList.of(SEGMENT3))
     );
 
     CloseableIterator<SegmentStatusInCluster> iterator = 
FutureUtils.getUnchecked(
-        coordinatorClient.getAllUsedSegments(null, true, false),
+        
coordinatorClient.fetchAllUsedSegmentsWithOvershadowedStatus(Collections.singleton("abc"),
 true),
         true
     );
+
     List<SegmentStatusInCluster> actualSegments = new ArrayList<>();
     while (iterator.hasNext()) {
       actualSegments.add(iterator.next());
     }
     Assert.assertEquals(
-        segments,
+        ImmutableList.of(SEGMENT3),

Review Comment:
   Nit: Use `List.of()`.



##########
server/src/test/java/org/apache/druid/client/coordinator/CoordinatorClientImplTest.java:
##########
@@ -617,51 +617,50 @@ public void test_getAllUsedSegments_noParams() throws 
JsonProcessingException
   }
 
   @Test
-  public void test_getAllUsedSegments_excludeRealtimeSegments() throws 
JsonProcessingException
+  public void 
test_fetchAllUsedSegmentsWithOvershadowedStatus_filterByDataSource() throws 
Exception
   {
-    final List<DataSegment> segments = ImmutableList.of(SEGMENT1, SEGMENT2, 
SEGMENT3);
-
     serviceClient.expectAndRespond(
         new RequestBuilder(
             HttpMethod.GET,
-            "/druid/coordinator/v1/metadata/segments?includeOvershadowedStatus"
+            
"/druid/coordinator/v1/metadata/segments?includeOvershadowedStatus&includeRealtimeSegments&datasources=abc"
         ),
         HttpResponseStatus.OK,
         ImmutableMap.of(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON),
-        jsonMapper.writeValueAsBytes(segments)
+        jsonMapper.writeValueAsBytes(ImmutableList.of(SEGMENT3))
     );
 
     CloseableIterator<SegmentStatusInCluster> iterator = 
FutureUtils.getUnchecked(
-        coordinatorClient.getAllUsedSegments(null, true, false),
+        
coordinatorClient.fetchAllUsedSegmentsWithOvershadowedStatus(Collections.singleton("abc"),
 true),

Review Comment:
   Nit: Use `Set.of()`



-- 
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: commits-unsubscr...@druid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to