Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-5458

Running tests should not affect incremental build

    XMLWordPrintable

    Details

    • Sprint:
      2020 Week 25-27 (from Jun 15), 2020 Week 28-30 (from Jul 6)
    • Steps to Reproduce:
      Hide
      1. Download the zip
      2. Import the project
      3. Run test scenario simulation
        1. If not failed - go to TicketPrices.drl and validate
          1. If DRL validation didn't fail run the scesim again and repeat the DRL validation
          2. If DRL validation failed, go to scesim and run again
        2. if failed - go to project and press Build
        3. Validate the rule again - should pass.
      4. Run the scenario again - should pass.
      Show
      Download the zip Import the project Run test scenario simulation If not failed - go to TicketPrices.drl and validate If DRL validation didn't fail run the scesim again and repeat the DRL validation If DRL validation failed, go to scesim and run again if failed - go to project and press Build Validate the rule again - should pass. Run the scenario again - should pass.
    • Workaround Description:
      Hide

      Not a workaround, rather damage limitation - build the project using Build.

      Show
      Not a workaround, rather damage limitation - build the project using Build.
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      For a Scenario Simulation that tests DRL rule and facts having an enum property a seemingly class-loading issue occurs in Business Central.

      The ultimate error is in the DRL file validation:

      DRL file
      package org.jboss.qa.ba.scesim;
      
      rule "child ticket"
      when
          t: Ticket ( type==TicketType.CHILD)
      then
          t.setPrice(5.0);
      end
      
      Validation error
      [KBase: defaultKieBase]: Unable to Analyse Expression type == TicketType.CHILD:
      [Error: Comparison operation requires compatible types. Found class org.jboss.qa.ba.scesim.TicketType and class org.jboss.qa.ba.scesim.TicketType]
      [Near : {... type == TicketType.CHILD ....}]
                           ^
      

      The issue happens in given scenario:

      1. import project
      2. go to DRL file and run validation - succeeds
      3. go to scenario simulation and run - succeeds
      4. go back to DRL file and run validation - fails with the error above
      5. go to scenario simulation and run again - fails due to the rule not being evaluated for given facts

      The issue disappears when running Build of the project in the Project perspective.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Rikkola Toni Rikkola
              Reporter:
              jstastny Jan Stastny
              Tester:
              Jan Stastny Jan Stastny
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: