Bug 978979

Summary: Regression in negative patterns in CEP
Product: [Retired] JBoss BRMS Platform 6 Reporter: Marek Winkler <mwinkler>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas David <tdavid>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: mfusco
Target Milestone: ER4Keywords: Regression
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:20:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 981270    
Bug Blocks:    

Description Marek Winkler 2013-06-27 12:25:51 UTC
Description of problem:

Rules containing a "not" operator do not fire expected number of times. This is either a regression, or a consequence of switching to Phreak(?).

Please see tests in the attached pull request. These tests passed in 6.0.0.Beta3 but fail now.

Version-Release number of selected component (if applicable):

Drools 6.0.0-SNAPSHOT (very likely Drools 6.0.0.Beta4)

The tests passed in Beta3.

How reproducible:

Run NegativePatternsTest from the pull request which will be attached shortly.

Comment 1 Marek Winkler 2013-06-27 12:27:50 UTC
Pull request with reproducer: https://github.com/droolsjbpm/drools/pull/218

Comment 2 Marek Winkler 2013-06-27 12:36:56 UTC
The test counts the number of rule firings. The differences might be caused by timing issues, but the difference in the first case is too large to be caused by too slow test execution:

Failed tests:   testConstrainedAbsence(org.drools.compiler.integrationtests.NegativePatternsTest): expected:<301> but was:<1>  

testMultipleEntryPoints(org.drools.compiler.integrationtests.NegativePatternsTest): expected:<1> but was:<0>

  testMultipleEvents(org.drools.compiler.integrationtests.NegativePatternsTest): expected:<300> but was:<298>

  testSingleEvent(org.drools.compiler.integrationtests.NegativePatternsTest): expected:<1> but was:<0>

Comment 3 Edson Tirelli 2013-08-30 21:28:47 UTC
This depends on the fix for BZ-981270.

Comment 4 Mario Fusco 2013-09-03 18:39:08 UTC
Fixed as a side-effect of the fix for BZ-981270.
I added a test case demonstrating how it is working now here:

https://github.com/droolsjbpm/drools/commit/da3478100

Comment 8 Tomas David 2013-10-14 08:25:35 UTC
Verified on BRMS 6.0.0.ER4.