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

Fix broken IT on jenkins

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 2.5.0-alpha2, 2.5.0
    • None
    • backend
    • None

    Description

      AT:

      • optional configuration service properties are properly reset
      • the OptimizeObjectMapper is consistently used when serializing responses

      Context:
      We have tests failing on jenkins:
      https://ci.optimize.camunda.cloud/view/all/job/camunda-optimize/job/master/742/

      As far as investigated the cause for at least the failing alert tests is an unclean embeddedOptimize config reset in TestEmbeddedCamundaOptimize which is caused by e.g. optional.empty getter values not being set by BeanUtils.copyProperties. Thus once they have been set they survive the reset and still apply in a following tests.
      This introduced instability based on test order.

      The second type of test failing is causes by the OffsetDateTime being not serialized correctly to a date string but to an object, which fails the parsing on the IT test.

      10:06:52.583 [qtp335359181-108] DEBUG o.c.o.r.p.ReportEvaluationExceptionMapper - Mapping ReportEvaluationException: view is not allowed to be null
      10:06:52.619 [qtp335359181-108] INFO  org.eclipse.jetty.server.RequestLog - 127.0.0.1 - - [08/May/2019:08:06:52 +0000] "GET /api/report/f974a165-0758-4792-b822-d100e8236c79/evaluate HTTP/1.1" 500 1739 
      10:06:52.619 [main] DEBUG o.c.o.t.i.r.TestEmbeddedCamundaOptimize - EmbeddedTestClient response for GET http://localhost:8090/api/report/f974a165-0758-4792-b822-d100e8236c79/evaluate: {"errorMessage":"view is not allowed to be null","reportDefinition":{"id":"f974a165-0758-4792-b822-d100e8236c79","name":"something","lastModified":{"offset":{"totalSeconds":7200,"id":"+02:00","rules":{"fixedOffset":true,"transitions":[],"transitionRules":[]}},"year":2019,"monthValue":5,"month":"MAY","dayOfMonth":8,"dayOfYear":128,"dayOfWeek":"WEDNESDAY","hour":10,"minute":6,"second":52,"nano":538000000},"created":{"offset":{"totalSeconds":7200,"id":"+02:00","rules":{"fixedOffset":true,"transitions":[],"transitionRules":[]}},"year":2019,"monthValue":5,"month":"MAY","dayOfMonth":8,"dayOfYear":128,"dayOfWeek":"WEDNESDAY","hour":10,"minute":6,"second":52,"nano":513000000},"owner":"something","lastModifier":"demo","data":{"configuration":{"color":"#1991c8","aggregationType":"avg","showInstanceCount":false,"pointMarkers":true,"precision":null,"hideRelativeValue":false,"hideAbsoluteValue":false,"alwaysShowRelative":false,"alwaysShowAbsolute":false,"showGradientBars":true,"xml":null,"excludedColumns":[],"columnOrder":{"inputVariables":[],"instanceProps":[],"outputVariables":[],"variables":[]},"targetValue":{"countChart":{"isBelow":false,"value":"100"},"durationProgress":{"baseline":{"unit":"hours","value":"0"},"target":{"unit":"hours","value":"2"}},"active":false,"countProgress":{"baseline":"0","target":"100"},"durationChart":{"unit":"hours","isBelow":false,"value":"2"}},"heatmapTargetValue":{"active":false,"values":{}},"xlabel":"","ylabel":""},"processDefinitionKey":"someRandomKey","processDefinitionVersion":"someRandomVersion","filter":[],"view":null,"groupBy":{"type":"none","value":null},"visualization":"number","parameters":{"processPart":null,"sorting":{"present":false}}},"combined":false,"reportType":"process"}}
      
      .....
      
      
      [ERROR] evaluateReportWithoutViewById(process) [0](org.camunda.optimize.rest.ReportRestServiceIT)  Time elapsed: 0.244 s  <<< ERROR!
      
      javax.ws.rs.ProcessingException: Error reading entity from input stream.
      
      	at org.camunda.optimize.rest.ReportRestServiceIT.evaluateReportWithoutViewById(ReportRestServiceIT.java:454)
      
      Caused by: com.fasterxml.jackson.databind.JsonMappingException: Text '{' could not be parsed at index 0 (through reference chain: org.camunda.optimize.dto.optimize.query.report.single.process.SingleProcessReportDefinitionDto["lastModified"])
      
      	at org.camunda.optimize.rest.ReportRestServiceIT.evaluateReportWithoutViewById(ReportRestServiceIT.java:454)
      
      Caused by: java.time.format.DateTimeParseException: Text '{' could not be parsed at index 0
      
      	at org.camunda.optimize.rest.ReportRestServiceIT.evaluateReportWithoutViewById(ReportRestServiceIT.java:454)
      
      
      

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              sebastian.bathke Sebastian Bathke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce