[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1152) my unit tests are hanging with drools 4.0.1
Steve Miner (JIRA)
jira-events at lists.jboss.org
Wed Sep 5 14:19:12 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-1152?page=comments#action_12375448 ]
Steve Miner commented on JBRULES-1152:
--------------------------------------
I've made some progress debugging my unit tests. It looks like there's a new sensitivity to the order of the actions on the RHS when using Drools 4.0.1. If I make an ACU and setState("off") and setPowerButtonPressed(true) then fireAllRules(), both rules fire. I only expected the "PowerOn" rule to fire. If I reorder the RHS so that setPowerButton(false) happens first (see comments), then everything works as expected.
I believe that the hang I originally reported was an oscillation in the system with multiple rules firing in cases where only one used to fire with Drools 4.0.
rule "PowerOn"
when
$acu : ACU (powerButtonPressed == true , state == "off" )
then
System.out.println("PowerOn fired");
// BEFORE WORKS $acu.setPowerButtonPressed(false);
$acu.setState("SelectMode");
// AFTER FAILS
$acu.setPowerButtonPressed(false);
end
rule "PowerOff"
when
$acu : ACU (powerButtonPressed == true, state != "off" )
then
System.out.println("PowerOff fired");
//BEFORE WORKS $acu.setPowerButtonPressed(false);
$acu.setState("off");
// AFTER FAILS
$acu.setPowerButtonPressed(false);
end
> my unit tests are hanging with drools 4.0.1
> -------------------------------------------
>
> Key: JBRULES-1152
> URL: http://jira.jboss.com/jira/browse/JBRULES-1152
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.0.1
> Environment: Java 1.5, Mac OX X 10.4.10, Drools 4.0.1
> Reporter: Steve Miner
> Assigned To: Mark Proctor
>
> Sorry, I don't have very specific information. Some of my project's unit tests are hanging with drools 4.0.1. No error, just not completing. I tried to debug a bit but could not figure it out. Consider this an early warning until I can gather more info.
> Everything worked fine with 4.0 so I went back to that.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list