Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-5130

ManagementServiceTest has errors and exeptions in general and a failure on IBM Informix DB

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 7.5.0, 7.5.0-alpha1
    • 7.4.0
    • engine
    • None

    Description

      Searching for a test case failure in ManagementServiceTest I saw, that there are a lot of errors and exceptions reported in org.camunda.bpm.engine.test.api.mgmt.ManagementServiceTest-output.txt, even when using h2 as database and not IBM Informix.
      Despite all these problems the testcase does not fail using h2.

      To overcome the problem on IBM Informix I suggest making this change:

      diff --git a/engine/src/test/java/org/camunda/bpm/engine/test/api/mgmt/ManagementServiceTest.java b/engine/src/test/java/org/camunda/bpm/engine/test/api/mgmt/ManagementServiceTest.java
      index 3b6dbcf..9c61a6b 100644
      --- a/engine/src/test/java/org/camunda/bpm/engine/test/api/mgmt/ManagementServiceTest.java
      +++ b/engine/src/test/java/org/camunda/bpm/engine/test/api/mgmt/ManagementServiceTest.java
      @@ -739,13 +739,12 @@ public class ManagementServiceTest extends PluggableProcessEngineTestCase {
           assertEquals(expectedTaskNames.length, rowData.size());
           String columnKey = "NAME_";
      
      -    // mybatis will return the correct case for postgres table columns from version 3.0.6 on
      -    if (processEngineConfiguration.getDatabaseType().equals("postgres")) {
      -      columnKey = "name_";
      -    }
      -
           for (int i=0; i < expectedTaskNames.length; i++) {
      -      assertEquals(expectedTaskNames[i], rowData.get(i).get(columnKey));
      +      Object o = rowData.get(i).get(columnKey);
      +      if ( o == null ) {
      +        o = rowData.get(i).get(columnKey.toLowerCase());
      +      }
      +      assertEquals(expectedTaskNames[i], o);
           }
         }
      

      IBM Informix also delivers the column names in lower case as postgres it obviously does. So my proposal is, to lookup the column content first with the upper case column name and, if not successful, try again with lower case name.

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              meyer Daniel Meyer
              langfr Frank Langelage
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce