C0urante commented on code in PR #12434:
URL: https://github.com/apache/kafka/pull/12434#discussion_r933387182
##########
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:
I think fail-fast is fine. It may cause resource leaks during test runs, but
if we do our due diligence and make sure tests pass before merging changes,
this should never happen on trunk or backport branches, and should only affect
local runs while iterating on changes.
--
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]