aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/pnfsimulator
diff options
context:
space:
mode:
authorMarcin Migdal <marcin.migdal@nokia.com>2018-11-16 12:12:37 +0100
committerMarcin Migdal <marcin.migdal@nokia.com>2018-11-16 12:14:45 +0100
commit4c79dda06347534fa52c4d3f3332e2fcadd97723 (patch)
treefed8c3cbd856a5154163790b911562a259925912 /test/mocks/pnfsimulator
parentb37a3cfdaf92c4855660d2f0c1b20eb482b99bd4 (diff)
Fix for bug PNF Simulator
Change-Id: I8816d6b13f8bc9233d3862c7a4fc94d92cf59f63 Issue-ID: INT-719 Signed-off-by: Marcin Migdal <marcin.migdal@nokia.com>
Diffstat (limited to 'test/mocks/pnfsimulator')
-rw-r--r--test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImpl.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImpl.java b/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImpl.java
index db1ea1578..f0c9917f5 100644
--- a/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImpl.java
+++ b/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImpl.java
@@ -33,6 +33,7 @@ import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
@@ -65,6 +66,7 @@ public class HttpClientAdapterImpl implements HttpClientAdapter {
try {
HttpPost request = createRequest(content, url);
HttpResponse response = client.execute(request);
+ EntityUtils.consumeQuietly(response.getEntity());
LOGGER.info(INVOKE, "Message sent, ves response code: {}", response.getStatusLine());
} catch (IOException e) {
LOGGER.warn("Error sending message to ves: {}", e.getMessage());