Handle duplicate events in drools-apps 37/107637/3
authorJim Hahn <jrh3@att.com>
Wed, 13 May 2020 16:55:37 +0000 (12:55 -0400)
committerJim Hahn <jrh3@att.com>
Wed, 13 May 2020 17:22:34 +0000 (13:22 -0400)
commitd8542b5a55d19584454215cd22d2f86cfb30e0a6
tree53ab9442e90c3be4465fe5fbd8c5dcc1738f076e
parent27e9926b266785f5173776d2cd33813568c0d2b3
Handle duplicate events in drools-apps

Modified the frankfurt rules to compare the event objects instead of
comparing the request ID when determining if an event is new.  The
event object's equals() method ignores the request ID when doing the
comparison, thus it will treat an event as a duplicate even if the
request ID is different, which is the behavior we want.

Also removed the @Ignore from the junit that tests for duplicate
events in the hope that this change will fix it.  If the docker build
still breaks, then @Ignore can be added back in.

Issue-ID: POLICY-2557
Change-Id: If2b9fd26473d78a356218b951bfe160f93daeb32
Signed-off-by: Jim Hahn <jrh3@att.com>
controlloop/common/controller-frankfurt/src/main/resources/frankfurt.drl
controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager2.java
controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseRuleTest.java
controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/BaseRuleTestTest.java
controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/NamedRunnerTest.java