diff options
author | Sai Gandham <sai.gandham@att.com> | 2019-03-07 20:01:20 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-07 20:01:20 +0000 |
commit | a50007dcded86acc2dcd610810f8afac720a058a (patch) | |
tree | cc0fb58c1191da21ae6a05ce0414ec87a1b303e7 /cadi/client | |
parent | 74ca7155fe903094350ab68f3ec6ac3dfe4e32b8 (diff) | |
parent | a174f8ddbc5eb78a648fb68b33ef18cb64d81fda (diff) |
Merge "Improve Batches"
Diffstat (limited to 'cadi/client')
3 files changed, 8 insertions, 9 deletions
diff --git a/cadi/client/src/main/java/org/onap/aaf/cadi/http/HClient.java b/cadi/client/src/main/java/org/onap/aaf/cadi/http/HClient.java index daca47df..056651eb 100644 --- a/cadi/client/src/main/java/org/onap/aaf/cadi/http/HClient.java +++ b/cadi/client/src/main/java/org/onap/aaf/cadi/http/HClient.java @@ -40,7 +40,6 @@ import org.onap.aaf.cadi.SecuritySetter; import org.onap.aaf.cadi.client.EClient; import org.onap.aaf.cadi.client.Future; import org.onap.aaf.cadi.client.Rcli; -import org.onap.aaf.cadi.util.FixURIinfo; import org.onap.aaf.misc.env.APIException; import org.onap.aaf.misc.env.Data; import org.onap.aaf.misc.env.Data.TYPE; @@ -153,9 +152,9 @@ public class HClient implements EClient<HttpURLConnection> { throw e; } catch (Exception e) { if(sendURI==null) { - throw new APIException("Cannot connect to Root URI: " + uri.toString(),e); + throw new APIException("Cannot connect to Root URI: '" + uri.toString() + '\'',e); } else { - throw new APIException("Cannot connect to " + sendURI.toString() + "(Root URI: " + uri.toString() +')',e); + throw new APIException("Cannot connect to '" + sendURI.toString() + "' (Root URI: '" + uri.toString() + "')",e); } } finally { // ensure all these are reset after sends meth=pathinfo=null; diff --git a/cadi/client/src/main/java/org/onap/aaf/cadi/http/HSecurityInfoInit.java b/cadi/client/src/main/java/org/onap/aaf/cadi/http/HSecurityInfoInit.java index 68d0f209..7c7d391f 100644 --- a/cadi/client/src/main/java/org/onap/aaf/cadi/http/HSecurityInfoInit.java +++ b/cadi/client/src/main/java/org/onap/aaf/cadi/http/HSecurityInfoInit.java @@ -41,7 +41,7 @@ public class HSecurityInfoInit implements SecurityInfoInit<HttpURLConnection> { @Override public SecuritySetter<HttpURLConnection> bestDefault(SecurityInfoC<HttpURLConnection> si) throws CadiException { try { - if (si.defaultAlias!=null) { + if (si.defaultClientAlias!=null) { si.set(new HX509SS(si)); } else if (si.access.getProperty(Config.AAF_APPID, null)!=null && si.access.getProperty(Config.AAF_APPPASS, null)!=null) { diff --git a/cadi/client/src/test/java/org/onap/aaf/cadi/locator/test/JU_HClientHotPeerLocator.java b/cadi/client/src/test/java/org/onap/aaf/cadi/locator/test/JU_HClientHotPeerLocator.java index e40ecb6e..d85a84a2 100644 --- a/cadi/client/src/test/java/org/onap/aaf/cadi/locator/test/JU_HClientHotPeerLocator.java +++ b/cadi/client/src/test/java/org/onap/aaf/cadi/locator/test/JU_HClientHotPeerLocator.java @@ -65,8 +65,8 @@ public class JU_HClientHotPeerLocator { assertThat(loc.hasItems(), is(true)); String[] messages = outStream.toString().split(System.lineSeparator()); - String preffered = messages[0].split(" ", 4)[3]; - String alternate = messages[1].split(" ", 4)[3]; + String preffered = messages[2].split(" ", 4)[3]; + String alternate = messages[3].split(" ", 4)[3]; assertThat(preffered, is("Preferred Client is " + goodURL1)); assertThat(alternate, is("Alternate Client is " + goodURL2)); @@ -98,9 +98,9 @@ public class JU_HClientHotPeerLocator { String urlStr = goodURL1 + ',' + goodURL2 + ',' + badURL; loc = new HClientHotPeerLocator(access, urlStr, 1000000, "38.627", "-90.199", ssMock); String[] messages = outStream.toString().split(System.lineSeparator()); - String preffered = messages[0].split(" ", 4)[3]; - String alternate1 = messages[1].split(" ", 4)[3]; - String alternate2 = messages[2].split(" ", 4)[3]; + String preffered = messages[2].split(" ", 4)[3]; + String alternate1 = messages[3].split(" ", 4)[3]; + String alternate2 = messages[4].split(" ", 4)[3]; assertThat(preffered, is("Preferred Client is " + badURL)); assertThat(alternate1, is("Alternate Client is " + goodURL1)); assertThat(alternate2, is("Alternate Client is " + goodURL2)); |