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.
Pull request with reproducer: https://github.com/droolsjbpm/drools/pull/218
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>
This depends on the fix for BZ-981270.
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
Verified on BRMS 6.0.0.ER4.