aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDominic Lunanuova <dgl@research.att.com>2018-02-13 22:44:20 +0000
committerDominic Lunanuova <dgl@research.att.com>2018-02-15 17:03:03 +0000
commit1ab29ec8a91e845a59a2990ca2fe17166111a458 (patch)
tree95c5f1f9b4d01d40801ab5c913cce1434dafb318 /src/main
parent5e6e1253d98f8738ae6b2d0c2eea0341a514586c (diff)
Automated test coverage code
Model tests Service tests Change-Id: If25ffd98f2a7e0b567252669f1fe55f736e26e36 Issue-ID: DMAAP-103 Signed-off-by: Dominic Lunanuova <dgl@research.att.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/dmaap/dbcapi/aaf/AafConnection.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/onap/dmaap/dbcapi/aaf/AafConnection.java b/src/main/java/org/onap/dmaap/dbcapi/aaf/AafConnection.java
index b7c02dd..2e91ca5 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/aaf/AafConnection.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/aaf/AafConnection.java
@@ -67,6 +67,10 @@ public class AafConnection extends BaseLoggingClass {
uc.setInstanceFollowRedirects(false);
logger.info( "successful connect to " + pURL );
return(true);
+ } catch ( UnknownHostException uhe ) {
+ errorLogger.error(DmaapbcLogMessageEnum.UNKNOWN_HOST_EXCEPTION, pURL, uhe.getMessage() );
+ uhe.printStackTrace();
+ return(false);
} catch (Exception e) {
errorLogger.error(DmaapbcLogMessageEnum.HTTP_CONNECTION_ERROR, pURL, e.getMessage() );
e.printStackTrace();
@@ -136,6 +140,10 @@ public class AafConnection extends BaseLoggingClass {
}
} catch ( SSLHandshakeException she ) {
errorLogger.error( DmaapbcLogMessageEnum.SSL_HANDSHAKE_ERROR, pURL);
+ } catch ( UnknownHostException uhe ) {
+ errorLogger.error(DmaapbcLogMessageEnum.UNKNOWN_HOST_EXCEPTION, pURL, uhe.getMessage() );
+ rc = 500;
+ return rc;
}
try {
rc = uc.getResponseCode();