zigarn commented on code in PR #12434:
URL: https://github.com/apache/kafka/pull/12434#discussion_r933495048


##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/RestServerTest.java:
##########
@@ -64,17 +70,34 @@ public class RestServerTest {
     private Herder herder;
     private Plugins plugins;
     private RestServer server;
+    private CloseableHttpClient httpClient;
+    private Collection<CloseableHttpResponse> responses = new ArrayList<>();
 
     protected static final String KAFKA_CLUSTER_ID = "Xbafgnagvar";
 
     @Before
     public void setUp() {
         herder = mock(Herder.class);
         plugins = mock(Plugins.class);
+        httpClient = HttpClients.createMinimal();
     }
 
     @After
     public void tearDown() {
+        responses.stream().forEach(response -> {
+            try {
+                response.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }

Review Comment:
   Done!



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

Reply via email to