Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-6405

Fix flaky getKpisForDefinition test

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 3.9.0, 3.9.0-alpha4
    • None
    • None
    • None
    • Not defined

      Brief summary of the bug. What is it ? Where is it ?

      When running the test

      ProcessKpiRetrievalIT.getKpisForDefinition

      on Jenkins, some runs fail because of the following error:

      [ERROR] Failures: 
      
      [2022-08-18T20:14:48.527Z] [ERROR]   ProcessKpiRetrievalIT.getKpisForDefinition:61 
      
      [2022-08-18T20:14:48.527Z] Expecting actual:
      
      [2022-08-18T20:14:48.527Z]   [("aProcessDefKey", [KpiResultDto(reportId=12aa7e69-c53d-466a-b146-b1201bec6ac5, reportName=My test report, value=1.0, target=2, isBelow=true, type=quality, measure=frequency, unit=null),
      
      [2022-08-18T20:14:48.527Z]     KpiResultDto(reportId=c27e21fc-7658-4587-870f-278d05197850, reportName=My test report, value=1.0, target=1, isBelow=true, type=quality, measure=frequency, unit=null)])]
      
      [2022-08-18T20:14:48.527Z] to contain exactly in any order:
      
      [2022-08-18T20:14:48.527Z]   [("aProcessDefKey", [KpiResultDto(reportId=c27e21fc-7658-4587-870f-278d05197850, reportName=My test report, value=1.0, target=1, isBelow=true, type=quality, measure=frequency, unit=null),
      
      [2022-08-18T20:14:48.528Z]     KpiResultDto(reportId=12aa7e69-c53d-466a-b146-b1201bec6ac5, reportName=My test report, value=1.0, target=2, isBelow=true, type=quality, measure=frequency, unit=null)])]
      
      [2022-08-18T20:14:48.528Z] elements not found:
      
      [2022-08-18T20:14:48.528Z]   [("aProcessDefKey", [KpiResultDto(reportId=c27e21fc-7658-4587-870f-278d05197850, reportName=My test report, value=1.0, target=1, isBelow=true, type=quality, measure=frequency, unit=null),
      
      [2022-08-18T20:14:48.528Z]     KpiResultDto(reportId=12aa7e69-c53d-466a-b146-b1201bec6ac5, reportName=My test report, value=1.0, target=2, isBelow=true, type=quality, measure=frequency, unit=null)])]
      
      [2022-08-18T20:14:48.528Z] and elements not expected:
      
      [2022-08-18T20:14:48.528Z]   [("aProcessDefKey", [KpiResultDto(reportId=12aa7e69-c53d-466a-b146-b1201bec6ac5, reportName=My test report, value=1.0, target=2, isBelow=true, type=quality, measure=frequency, unit=null),
      
      [2022-08-18T20:14:48.528Z]     KpiResultDto(reportId=c27e21fc-7658-4587-870f-278d05197850, reportName=My test report, value=1.0, target=1, isBelow=true, type=quality, measure=frequency, unit=null)])]
      
      [2022-08-18T20:14:48.528Z] 
      
      [2022-08-18T20:14:48.528Z] [INFO] 
      
       
      

      which essentially says that the order of the KPIs returned is different that expected. To fix this we need find a way to asset on the KPIs contained in a definition without having the order in which they are returned interfere with the result.

      Steps to reproduce:

      Run the optimize on Jenkins. In some builds the test fails

      Actual result:

      The test is occasionally flaky

      Expected result:

      The test should always pass

        This is the controller panel for Smart Panels app

              giuliano.rodrigues-lima Giuliano Rodrigues Lima
              andromachi.rozaki Andromachi Rozaki
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: