Fix unit tests failing after 3pp uplift 89/139389/1
authoradheli.tavares <adheli.tavares@est.tech>
Tue, 12 Nov 2024 12:12:20 +0000 (12:12 +0000)
committeradheli.tavares <adheli.tavares@est.tech>
Tue, 12 Nov 2024 12:21:05 +0000 (12:21 +0000)
Issue-ID: POLICY-5073
Change-Id: If1fe391d578035b717fa7a428c284fd1aafb68db
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
main/src/test/java/org/onap/policy/pdpx/main/startstop/TestMain.java
main/src/test/java/org/onap/policy/pdpx/main/startstop/TestXacmlPdpActivator.java

index 80e6f70..b9b8b9e 100644 (file)
@@ -29,6 +29,7 @@ import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import org.onap.policy.common.parameters.ParameterService;
 import org.onap.policy.pdpx.main.CommonRest;
 import org.onap.policy.pdpx.main.PolicyXacmlPdpException;
 
@@ -46,6 +47,7 @@ class TestMain extends CommonRest {
      */
     @BeforeAll
     public static void setUpBeforeClass() throws Exception {
+        ParameterService.clear();
         CommonRest.setUpBeforeClass();
 
         // don't want the common "main" running
index bdcbd99..2db620d 100644 (file)
@@ -30,6 +30,7 @@ import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import org.onap.policy.common.parameters.ParameterService;
 import org.onap.policy.pdpx.main.CommonRest;
 import org.onap.policy.pdpx.main.parameters.CommonTestData;
 import org.onap.policy.pdpx.main.parameters.XacmlPdpParameterGroup;
@@ -52,6 +53,7 @@ public class TestXacmlPdpActivator extends CommonRest {
      */
     @BeforeAll
     public static void setUpBeforeClass() throws Exception {
+        ParameterService.clear();
         CommonRest.setUpBeforeClass();
 
         final String[] xacmlPdpConfigParameters = {"-c", CommonRest.CONFIG_FILE};