abhishekrb19 commented on code in PR #18861:
URL: https://github.com/apache/druid/pull/18861#discussion_r2658186416


##########
server/src/test/java/org/apache/druid/client/DirectDruidClientTest.java:
##########
@@ -151,86 +110,77 @@ public void testRun() throws Exception
   {
     final URL url = new URL(StringUtils.format("http://%s/druid/v2/";, 
hostName));
 
-    SettableFuture<InputStream> futureResult = SettableFuture.create();
-    Capture<Request> capturedRequest = EasyMock.newCapture();
-    EasyMock.expect(
-        httpClient.go(
-            EasyMock.capture(capturedRequest),
-            EasyMock.<HttpResponseHandler>anyObject(),
-            EasyMock.anyObject(Duration.class)
-        )
-    )
-            .andReturn(futureResult)
-            .times(1);
-
-    SettableFuture futureException = SettableFuture.create();
-    EasyMock.expect(
-        httpClient.go(
-            EasyMock.capture(capturedRequest),
-            EasyMock.<HttpResponseHandler>anyObject(),
-            EasyMock.anyObject(Duration.class)
-        )
-    )
-            .andReturn(futureException)
-            .times(1);
-
-    EasyMock.expect(
-        httpClient.go(
-            EasyMock.capture(capturedRequest),
-            EasyMock.<HttpResponseHandler>anyObject(),
-            EasyMock.anyObject(Duration.class)
-        )
-    )
-            .andReturn(SettableFuture.create())
-            .atLeastOnce();
+    // A simple HttpClient that records requests and returns queued futures 
per call.
+    class SequencedHttpClient implements HttpClient

Review Comment:
   Sure, I’ve moved it to a separate test class under the same root as 
`TestHttpClient`.



-- 
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