diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-01-21 19:17:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-01-21 19:17:15 +0000 |
commit | 3fcc3204c1c65a5e5f774088bca1fd81dedd9ddb (patch) | |
tree | b1d2274b8b745ec90cdcc78c38b7ba6503f7472f /ONAP-PDP-REST | |
parent | 40483cec64275e908c498309503cb17fbbd81c7a (diff) | |
parent | e37f5a70bcf3fd8073418c13416cc79c0ef47d59 (diff) |
Merge "policy/engine jdk11 upgrades"
Diffstat (limited to 'ONAP-PDP-REST')
-rw-r--r-- | ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/PapUrlResolverTest.java | 26 | ||||
-rw-r--r-- | ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/XACMLPdpServletTest.java | 4 |
2 files changed, 16 insertions, 14 deletions
diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/PapUrlResolverTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/PapUrlResolverTest.java index fb768f7d7..841fad641 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/PapUrlResolverTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/PapUrlResolverTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-PDP-REST * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017, 2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Modifications Copyright (C) 2019 Samsung * ================================================================================ @@ -59,6 +59,9 @@ public class PapUrlResolverTest { succeeded = prop.getProperty(XacmlRestProperties.PROP_PAP_SUCCEEDED_URLS); rs = PapUrlResolver.getInstance(urls, failed, succeeded); Assert.assertTrue(rs.hasMoreUrls()); + Assert.assertEquals("http://one.localhost.com", rs.getUrl()); + rs.getNext(); + Assert.assertTrue(rs.hasMoreUrls()); Assert.assertEquals("http://two.localhost.com", rs.getUrl()); rs.getNext(); Assert.assertTrue(rs.hasMoreUrls()); @@ -66,9 +69,6 @@ public class PapUrlResolverTest { rs.getNext(); Assert.assertTrue(rs.hasMoreUrls()); Assert.assertEquals("http://four.localhost.com", rs.getUrl()); - rs.getNext(); - Assert.assertTrue(rs.hasMoreUrls()); - Assert.assertEquals("http://one.localhost.com", rs.getUrl()); rs.succeeded(); rs.getNext(); Assert.assertFalse(rs.hasMoreUrls()); @@ -128,13 +128,13 @@ public class PapUrlResolverTest { String succeeded = "-1,8/13/15 5:41 PM,8/13/15 4:41 PM,-1"; PapUrlResolver rs = PapUrlResolver.getInstance(urls, failed, succeeded); Assert.assertTrue(rs.hasMoreUrls()); - Assert.assertEquals("http://two.localhost.com", rs.getUrl()); + Assert.assertEquals("http://one.localhost.com", rs.getUrl()); rs.getNext(); Assert.assertTrue(rs.hasMoreUrls()); - Assert.assertEquals("http://three.localhost.com", rs.getUrl()); + Assert.assertEquals("http://two.localhost.com", rs.getUrl()); rs.getNext(); Assert.assertTrue(rs.hasMoreUrls()); - Assert.assertEquals("http://one.localhost.com", rs.getUrl()); + Assert.assertEquals("http://three.localhost.com", rs.getUrl()); rs.getNext(); Assert.assertTrue(rs.hasMoreUrls()); Assert.assertEquals("http://four.localhost.com", rs.getUrl()); @@ -186,13 +186,13 @@ public class PapUrlResolverTest { succeeded = "-1,-1,-1,-1"; rs = PapUrlResolver.getInstance(urls, failed, succeeded); Assert.assertTrue(rs.hasMoreUrls()); - Assert.assertEquals("http://two.localhost.com", rs.getUrl()); + Assert.assertEquals("http://one.localhost.com", rs.getUrl()); rs.getNext(); Assert.assertTrue(rs.hasMoreUrls()); - Assert.assertEquals("http://three.localhost.com", rs.getUrl()); + Assert.assertEquals("http://two.localhost.com", rs.getUrl()); rs.getNext(); Assert.assertTrue(rs.hasMoreUrls()); - Assert.assertEquals("http://one.localhost.com", rs.getUrl()); + Assert.assertEquals("http://three.localhost.com", rs.getUrl()); rs.getNext(); Assert.assertTrue(rs.hasMoreUrls()); Assert.assertEquals("http://four.localhost.com", rs.getUrl()); @@ -204,6 +204,9 @@ public class PapUrlResolverTest { succeeded = "-1,-1,-1,-1"; rs = PapUrlResolver.getInstance(urls, failed, succeeded); Assert.assertTrue(rs.hasMoreUrls()); + Assert.assertEquals("http://one.localhost.com", rs.getUrl()); + rs.getNext(); + Assert.assertTrue(rs.hasMoreUrls()); Assert.assertEquals("http://two.localhost.com", rs.getUrl()); rs.getNext(); Assert.assertTrue(rs.hasMoreUrls()); @@ -212,9 +215,6 @@ public class PapUrlResolverTest { Assert.assertTrue(rs.hasMoreUrls()); Assert.assertEquals("http://four.localhost.com", rs.getUrl()); rs.getNext(); - Assert.assertTrue(rs.hasMoreUrls()); - Assert.assertEquals("http://one.localhost.com", rs.getUrl()); - rs.getNext(); Assert.assertFalse(rs.hasMoreUrls()); urls = "http://one.localhost.com,http://two.localhost.com,http://three.localhost.com,http://four.localhost.com"; diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/XACMLPdpServletTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/XACMLPdpServletTest.java index 17601a280..eb6910ca7 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/XACMLPdpServletTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/XACMLPdpServletTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-PDP-REST * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Modifications Copyright (C) 2019 Samsung * ================================================================================ @@ -47,6 +47,7 @@ import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.xacml.std.pap.StdPDPPolicy; import org.onap.policy.xacml.std.pap.StdPDPStatus; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import org.springframework.mock.web.MockHttpServletResponse; @@ -56,6 +57,7 @@ import com.mockrunner.mock.web.MockServletInputStream; import junit.framework.TestCase; @RunWith(PowerMockRunner.class) +@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.dom.*"}) @PrepareForTest({IntegrityMonitor.class}) public class XACMLPdpServletTest extends TestCase { private static Logger LOGGER = FlexLogger.getLogger(XACMLPdpServletTest.class); |