Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1374

Test scenario fails if the string contains semicolon

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.7.0.GA, 7.7.1.GA
    • None
    • Hide

      1) Import the project in business-central.

      2) Run the test scenario. The rule is getting fired but the test scenario is failing.

      3) Modify the DRL and test scenario to remove semicolon, In this case test scenario is successful.

      Show
      1) Import the project in business-central. 2) Run the test scenario. The rule is getting fired but the test scenario is failing. 3) Modify the DRL and test scenario to remove semicolon, In this case test scenario is successful.
    • 2020 Week 25-27 (from Jun 15)

      We have a rule which adds string literals to a list.

      If we add a string literal that contains semicolon in it then the test scenario fails even if the expected condition has the same literal.

      The rule is getting fired correctly and the object is getting modified but test scenarios are failing. Test scenario works fine if the string doesn't have any semicolon.

       

      // Sample Rule
      ---------------
      package com.testscenario.testscenariobug;
      
      import java.util.List;
      import java.util.ArrayList;
      
      rule "Modify Data Object"  
      
        when
            td: TestDataObj( rulevalidator == true)
        then
            System.out.println( "Rule fired" ); 
            List<String> a = new ArrayList();
            
            a.add("string with; semicolon test it");
            
            modify ( td ){
                
                setMessages(a);
            };
             System.out.println( "Object Modified" + td); 
      end
      
      Results
      --------
      
      19:01:29,060 INFO  [stdout] (default task-16) Rule fired
      19:01:29,060 INFO  [stdout] (default task-16) Object ModifiedThe rulevalidator istrue. Messages are string with; semicolon test it
      
      

      Attaching the reproducer for your reference.TestScenario_TestScenarioBug.zip

       

              yamer@redhat.com Yeser Amer
              rhn-support-sudnair Sudhish Nair
              Jozef Marko Jozef Marko (Inactive)
              Jozef Marko Jozef Marko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: