summaryrefslogtreecommitdiffstats
path: root/appc-event-listener/appc-event-listener-bundle/src/main/java/org
diff options
context:
space:
mode:
authorJoss Armstrong <joss.armstrong@ericsson.com>2019-02-20 11:13:51 +0000
committerTakamune Cho <takamune.cho@att.com>2019-02-21 15:03:47 +0000
commit76dbfd952b3398bf7699c7a100c777b1881ed53e (patch)
tree44a1f896b0036670cc5bb2b557c0e3d94b1eaf6a /appc-event-listener/appc-event-listener-bundle/src/main/java/org
parent206c2d96a4ada3d60e68ac67539925fe5baa545b (diff)
Test coverage in LCM ProviderOperations
Added test cases Issue-ID: APPC-1462 Change-Id: I577bcbb1f1ea36fdddbe30b115710588472bd45c Signed-off-by: Joss Armstrong <joss.armstrong@ericsson.com>
Diffstat (limited to 'appc-event-listener/appc-event-listener-bundle/src/main/java/org')
-rw-r--r--appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/LCM/operation/GenericProviderOperationRequestFormatter.java4
-rw-r--r--appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/LCM/operation/ProviderOperations.java5
2 files changed, 7 insertions, 2 deletions
diff --git a/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/LCM/operation/GenericProviderOperationRequestFormatter.java b/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/LCM/operation/GenericProviderOperationRequestFormatter.java
index 3dddd87a5..ca0f52ac7 100644
--- a/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/LCM/operation/GenericProviderOperationRequestFormatter.java
+++ b/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/LCM/operation/GenericProviderOperationRequestFormatter.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications Copyright (C) 2019 Ericsson
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,7 +48,7 @@ public class GenericProviderOperationRequestFormatter implements ProviderOperati
@Override
public String buildPath(URL url, String rpcName) {
- return url.getPath() + ":"+rpcName;
+ return url.getPath() + ":" + rpcName;
}
@Override
diff --git a/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/LCM/operation/ProviderOperations.java b/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/LCM/operation/ProviderOperations.java
index 39ad7b454..42206ec2e 100644
--- a/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/LCM/operation/ProviderOperations.java
+++ b/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/LCM/operation/ProviderOperations.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications Copyright (C) 2019 Ericsson
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -194,7 +196,7 @@ public class ProviderOperations {
}
@SuppressWarnings("deprecation")
- private HttpClient getHttpClient() throws APPCException {
+ protected HttpClient getHttpClient() throws APPCException {
HttpClient client;
switch (url.getProtocol()) {
case "https":
@@ -217,6 +219,7 @@ public class ProviderOperations {
ClientConnectionManager ccm = new ThreadSafeClientConnManager(params, registry);
client = new DefaultHttpClient(ccm, params);
} catch (Exception e) {
+ LOG.error("Error getting HTTP Client", e);
client = new DefaultHttpClient();
}
break;