From: liamfallon Date: Wed, 25 Apr 2018 19:11:54 +0000 (+0100) Subject: Remove unit test Java version dependency X-Git-Tag: v1.2.1~19^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=commitdiff_plain;h=06890d6ab0b7b11eb3fa5a76234195a376b3854c Remove unit test Java version dependency In the unit tests for the direct Sona Nexus Rest Interface, one of the unit tests only passed on an Oracle Java specific string. This test is fixed to now work on both Oracle and OpenJDK java Issue-ID: POLICY-700 Change-Id: Idae1aaf612a10ac003f2a91c0b5a80540152ac95 Signed-off-by: liamfallon --- diff --git a/BRMSGateway/src/test/java/org/onap/policy/brms/api/nexus/NexusRestWrapperTest.java b/BRMSGateway/src/test/java/org/onap/policy/brms/api/nexus/NexusRestWrapperTest.java index bc666fb08..60adecd41 100644 --- a/BRMSGateway/src/test/java/org/onap/policy/brms/api/nexus/NexusRestWrapperTest.java +++ b/BRMSGateway/src/test/java/org/onap/policy/brms/api/nexus/NexusRestWrapperTest.java @@ -103,8 +103,7 @@ public class NexusRestWrapperTest { fail("test shold throw an exception here"); } catch (NexusRestWrapperException e) { assertEquals("search to URI http://localhost:99999/service/local/lucene/search?g=org.onap.policy.engine " - + "failed with message: java.lang.IllegalArgumentException: port out of range:99999", - e.getMessage()); + + "failed with message: ", e.getMessage().substring(0, 111)); } wrapper.close(); @@ -118,8 +117,7 @@ public class NexusRestWrapperTest { fail("test shold throw an exception here"); } catch (NexusRestWrapperException e) { assertEquals("search to URI http://localhost:57344/service/local/lucene/search?g=org.onap.policy.engine " - + "failed with message: java.net.ConnectException: Connection refused (Connection refused)", - e.getMessage()); + + "failed with message: ", e.getMessage().substring(0, 111)); } wrapper.close();