diff --git a/databridge.examples/databridge.examples.httppolling-jsonata-delegator/src/test/java/org/eclipse/digitaltwin/basyx/databridge/examples/httppollingjsonatadelegator/test/TestAASUpdater.java b/databridge.examples/databridge.examples.httppolling-jsonata-delegator/src/test/java/org/eclipse/digitaltwin/basyx/databridge/examples/httppollingjsonatadelegator/test/TestAASUpdater.java index 34651db3..e3b789c4 100644 --- a/databridge.examples/databridge.examples.httppolling-jsonata-delegator/src/test/java/org/eclipse/digitaltwin/basyx/databridge/examples/httppollingjsonatadelegator/test/TestAASUpdater.java +++ b/databridge.examples/databridge.examples.httppolling-jsonata-delegator/src/test/java/org/eclipse/digitaltwin/basyx/databridge/examples/httppollingjsonatadelegator/test/TestAASUpdater.java @@ -105,7 +105,9 @@ private String getContentFromDelegatedEndpoint() throws IOException { HttpGet request = new HttpGet("http://localhost:8090/valueA"); CloseableHttpResponse resp = client.execute(request); - return EntityUtils.toString(resp.getEntity()); + String content = EntityUtils.toString(resp.getEntity()); + client.close(); + return content; } private static String getResponseBody() {