From 65df6b22a4f0197a2fb9783c12fd5d680ef123f6 Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Mon, 16 Dec 2024 19:38:20 +0100 Subject: [PATCH] test: close exchange on AbstractSimultaneousConnectionsTest Signed-off-by: Marc Nuri --- .../client/http/AbstractSimultaneousConnectionsTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/http/AbstractSimultaneousConnectionsTest.java b/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/http/AbstractSimultaneousConnectionsTest.java index d06a7bc58e..998233f952 100644 --- a/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/http/AbstractSimultaneousConnectionsTest.java +++ b/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/http/AbstractSimultaneousConnectionsTest.java @@ -96,7 +96,10 @@ private void withHttp1() { @DisabledOnOs(OS.WINDOWS) public void http1Connections() throws Exception { final DelayedResponseHandler handler = new DelayedResponseHandler(MAX_HTTP_1_CONNECTIONS, - exchange -> exchange.sendResponseHeaders(204, 0)); + exchange -> { + exchange.sendResponseHeaders(204, -1); + exchange.close(); + }); httpServer.createContext("/http", handler); try (final HttpClient client = clientBuilder.build()) { final Collection>> asyncResponses = ConcurrentHashMap.newKeySet();