summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUtkarsh Jauhari <uj426b@att.com>2020-06-24 20:49:50 +0000
committerUtkarsh Jauhari <uj426b@att.com>2020-06-25 00:22:10 +0000
commit025d4cdf019ce3d5ca47624072a92e1174c4311e (patch)
tree83bed5acbfb22f675ab381b8e0d41d34697c8c46
parent0bf7d4c87390df3cdaf52fba340fb6531c7415db (diff)
Fix Junit failed after AAF version change 2.1.21
Issue-ID: POLICY-2623 Signed-off-by: Utkarsh Jauhari <uj426b@att.com> Change-Id: I86c5b6efac8f62dd0d4ba576d8ec49cfa63a58bb
-rw-r--r--policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java
index 601c3e9f..1d1568cc 100644
--- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java
@@ -99,9 +99,14 @@ public class HttpServerTest {
port += 10;
}
+ /**
+ * To delete temporary properties cadi_longitude,and cadi_latitude.
+ */
@AfterClass
public static void tearDownAfterClass() {
HttpServletServerFactoryInstance.getServerFactory().destroy();
+ System.clearProperty("cadi_longitude");
+ System.clearProperty("cadi_latitude");
}
@Test
@@ -374,6 +379,8 @@ public class HttpServerTest {
assertTrue(HttpServletServerFactoryInstance.getServerFactory().get(port).isAlive());
assertEquals(1, HttpServletServerFactoryInstance.getServerFactory().inventory().size());
+ System.setProperty("cadi_longitude", "0.0");
+ System.setProperty("cadi_latitude", "0.0");
server.setAafAuthentication("/*");
assertTrue(HttpServletServerFactoryInstance.getServerFactory().get(port).isAaf());