Fix build error in drools-apps related to services 86/121186/2
authorJim Hahn <jrh3@att.com>
Fri, 7 May 2021 13:50:59 +0000 (09:50 -0400)
committerJim Hahn <jrh3@att.com>
Fri, 7 May 2021 14:18:58 +0000 (10:18 -0400)
Apparently, creating the event services in the rule file has broken the
junit test of the rules.  It appears that the http clients are not yet
loaded into the drools-pdp engine by the time the first rule fires, thus
the event manager is unable to initialize all of its actors.

Modified the junit to not start the rules until after the http clients
have been started.

Issue-ID: POLICY-3260
Change-Id: I83fe4ea9fa7ca24396019c18f0d77352fbe86db4
Signed-off-by: Jim Hahn <jrh3@att.com>
controlloop/common/controller-usecases/src/test/java/org/onap/policy/controlloop/UsecasesTest.java

index b9864bd..8b0403d 100644 (file)
@@ -54,10 +54,11 @@ public class UsecasesTest extends DroolsRuleTest {
         initStatics(CONTROLLER_NAME);
 
         rules.configure("src/main/resources");
-        rules.start();
         httpClients.addClients("usecases");
         simulators.start(Util::buildAaiSim, Util::buildSoSim, Util::buildVfcSim, Util::buildGuardSim,
                         Util::buildSdncSim);
+
+        rules.start();
     }
 
     /**