From: Jim Hahn Date: Fri, 7 May 2021 13:50:59 +0000 (-0400) Subject: Fix build error in drools-apps related to services X-Git-Tag: 1.9.0~25 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=2faa81d80569ce38a014e2a2ab404b1ea9f6899e;p=policy%2Fdrools-applications.git Fix build error in drools-apps related to services 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 --- diff --git a/controlloop/common/controller-usecases/src/test/java/org/onap/policy/controlloop/UsecasesTest.java b/controlloop/common/controller-usecases/src/test/java/org/onap/policy/controlloop/UsecasesTest.java index b9864bdd7..8b0403df3 100644 --- a/controlloop/common/controller-usecases/src/test/java/org/onap/policy/controlloop/UsecasesTest.java +++ b/controlloop/common/controller-usecases/src/test/java/org/onap/policy/controlloop/UsecasesTest.java @@ -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(); } /**