Some junits fail, depending on the order. Traced down to
VfwControlLoopCdsTest, which sets the custom query flag, but does
not reset it when the test is complete. Modified the test superclass
to reset it at the start and end of each test class.
Issue-ID: POLICY-2088
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I6c9ba7e37074945141ea64dfd130dc99f376a825
public static void setUpBeforeClass(String droolsTemplate, String yamlFile, String policyScope,
String policyName, String policyVersion) {
+ SupportUtil.setCustomQuery("false");
+
/* Set environment properties */
SupportUtil.setAaiProps();
SupportUtil.setGuardProps();
*/
@AfterClass
public static void tearDownAfterClass() {
+
+ SupportUtil.setCustomQuery("false");
+
/*
* Gracefully shut down the kie session
*/
"service=ServiceDemo;resource=Res1Demo;type=operational",
"CL_vCPE",
"org.onap.closed_loop.ServiceDemo:VNFS:1.0.0");
- SupportUtil.setCustomQuery("false");
}
@Test
import java.time.Instant;
import java.util.HashMap;
import java.util.UUID;
-
-import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
SupportUtil.setCustomQuery("true");
}
- @AfterClass
- public static void tearDownAfterClass() {
- SupportUtil.setCustomQuery("false");
- ControlLoopBase.tearDownAfterClass();
- }
-
@Test
public void successTest() {