From 025d4cdf019ce3d5ca47624072a92e1174c4311e Mon Sep 17 00:00:00 2001 From: Utkarsh Jauhari Date: Wed, 24 Jun 2020 20:49:50 +0000 Subject: Fix Junit failed after AAF version change 2.1.21 Issue-ID: POLICY-2623 Signed-off-by: Utkarsh Jauhari Change-Id: I86c5b6efac8f62dd0d4ba576d8ec49cfa63a58bb --- .../policy/common/endpoints/http/server/test/HttpServerTest.java | 7 +++++++ 1 file changed, 7 insertions(+) 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()); -- cgit 1.2.3-korg