[jboss-jira] [JBoss JIRA] Created: (JBRULES-2548) ExecutionFlowControlTest#testRuleFlowGroupInActiveMode() has timing issues

Andreas Kohn (JIRA) jira-events at lists.jboss.org
Mon Jun 14 06:46:46 EDT 2010


ExecutionFlowControlTest#testRuleFlowGroupInActiveMode() has timing issues
--------------------------------------------------------------------------

                 Key: JBRULES-2548
                 URL: https://jira.jboss.org/browse/JBRULES-2548
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-core (flow)
    Affects Versions: 5.0.1.FINAL
         Environment: Various linux machines of different loads, cpu speeds, and memory sizes.
            Reporter: Andreas Kohn
            Assignee: Mark Proctor


The ExecutionFlowControlTest#testRuleFlowGroupInActive() uses a thread to constantly fire rules, and then verifies in the unit test that at most 1s *wall clock time* after the rule flow group was activated the rule has fired.

This "1s" dependency is really wrong here: nothing in the rule specifies that, and if the machine is loaded it may be that the scheduling of a thread takes longer than that 1s.

Attached patch removes the thread, and instead explicitly uses WorkingMemory#fireAllRules() to test the activation of the group.


(Rationale: this test tends to fail quite often in our autobuild/CI environment)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list