Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

[BUG] Fix issue related to flaky test IntegrationsResourceTest.complexEIP:165 on MacOS #420

Closed
apupier opened this issue Jan 23, 2023 · 2 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@apupier
Copy link
Contributor

apupier commented Jan 23, 2023

Describe the bug

intermittent failure on CI. Spotted only on MacOS so far

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Logs

Error:  Failures: 
Error:    IntegrationsResourceTest.complexEIP:165 
Expecting actual:
  "apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
metadata:
  annotations:
    camel.apache.org/kamelet.icon: whatever
  labels:
    camel.apache.org/kamelet.type: action
  name: eip-action
spec:
  definition:
    title: EIP Kamelet
    description: Used to test all EIP we implement
    properties: {}
  dependencies:
  - camel:core
  - camel:kamelet
  template:
    from:
      uri: kamelet:source
      steps:
      - loop:
          constant: '3'
          copy: true
          steps:
          - saga:
              completion:
                uri: direct:completion
              propagation: MANDATORY
              compensation:
                uri: direct:compensation
              completion-mode: MANUAL
              steps: []
              option:
              - key: o1
                simple: ${body}
              - key: o2
                expression:
                  simple: ${body}
          - routing-slip:
              uri-delimiter: '|'
              simple: ${body}
      - choice:
          when:
          - simple: '{{?foo}}'
            steps:
            - dynamic-router:
                simple: ${body}
            - set-header:
                name: bar
                simple: foo
          - simple: '{{?bar}}'
            steps:
            - set-property:
                name: property
                simple: bar
            - threads:
                pool-size: 8
          - simple: '{{?baz}}'
            steps:
            - recipient-list:
                stop-on-exception: true
                constant: direct:a,direct:b
                parallel-processing: true
            - remove-headers:
                exclude-pattern: toExclude
                pattern: toRemove
            - aggregate:
                correlation-expression:
                  simple: ${header.StockSymbol}
                aggregation-strategy: myAggregatorStrategy
                completion-size: 2
          otherwise:
            steps:
            - claim-check:
                operation: Push
                key: foo
                filter: header:(foo|bar)
            - rollback:
                mark-rollback-only: true
                message: test
            - stop: {}
      - do-try:
          steps:
          - set-body:
              simple: abc
          - set-exchange-pattern: InOut
          do-catch:
          - exception:
            - java.io.FileNotFoundException
            - java.io.IOException
            on-when:
              simple: ${body.size()} == 1
            steps:
            - log:
                message: test
                logging-level: INFO
                log-name: yaml
          do-finally:
            steps:
            - enrich:
                expression:
                  simple: ${body}
      - to:
          uri: kamelet:sink
"
to be equal to:
  "apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
metadata:
  annotations:
    camel.apache.org/kamelet.icon: whatever
  labels:
    camel.apache.org/kamelet.type: action
  name: eip-action
spec:
  definition:
    title: EIP Kamelet
    description: Used to test all EIP we implement
    properties: {}
  dependencies:
  - camel:core
  - camel:kamelet
  template:
    from:
      uri: kamelet:source
      steps:
      - transacted:
          ref: required
      - loop:
          constant: '3'
          copy: true
          steps:
          - saga:
              completion:
                uri: direct:completion
              propagation: MANDATORY
              compensation:
                uri: direct:compensation
              completion-mode: MANUAL
              steps:
              - throttle:
                  caller-runs-when-rejected: false
                  constant: '5'
                  executor-service: myExecutor
                  reject-execution: false
                  async-delayed: true
              - sample:
                  description:
                    text: Message Sampler
                    lang: eng
                  sample-period: '1500'
                  message-frequency: 5
              - script:
                  expression:
                    simple: ${body}
              option:
              - key: o1
                simple: ${body}
              - key: o2
                expression:
                  simple: ${body}
          - delay:
              expression:
                simple: ${body}
              async-delayed: true
          - routing-slip:
              uri-delimiter: '|'
              simple: ${body}
      - choice:
          when:
          - simple: '{{?foo}}'
            steps:
            - dynamic-router:
                simple: ${body}
            - set-header:
                name: bar
                simple: foo
          - simple: '{{?bar}}'
            steps:
            - set-property:
                name: property
                simple: bar
            - threads:
                pool-size: 8
            - split:
                steps:
                - remove-property:
                    name: property
                tokenize: ','
            - marshal:
                json:
                  library: Gson
            - wire-tap:
                uri: direct:infiniteandbeyond
                parameters:
                  failIfNoConsumers: 'true'
                  block: 'false'
          - simple: '{{?baz}}'
            steps:
            - recipient-list:
                stop-on-exception: true
                constant: direct:a,direct:b
                parallel-processing: true
            - remove-headers:
                exclude-pattern: toExclude
                pattern: toRemove
            - resequence:
                simple: ${in.header.seqnum}
                stream-config:
                  capacity: '5000'
                  timeout: '4000'
                steps:
                - transform:
                    simple: baz
                - remove-properties:
                    exclude-pattern: toExclude
                    pattern: toRemove
            - aggregate:
                correlation-expression:
                  simple: ${header.StockSymbol}
                aggregation-strategy: myAggregatorStrategy
                completion-size: 2
            - load-balance:
                weighted:
                  distribution-ratio: 2,1
                  round-robin: false
                steps:
                - log:
                    message: test
                    logging-level: INFO
                    log-name: yaml
                - service-call:
                    blacklist-service-filter:
                      servers:
                      - service2@host1
                    name: sc
                    static-service-discovery:
                      servers:
                      - service1@host1
                      - service1@host2
          otherwise:
            steps:
            - remove-header:
                name: removeme
            - claim-check:
                operation: Push
                key: foo
                filter: header:(foo|bar)
            - rollback:
                mark-rollback-only: true
                message: test
            - throw-exception:
                exception-type: java.lang.IllegalArgumentException
                message: test
            - stop: {}
      - filter:
          simple: '{{?foo}}'
          steps:
          - set-body:
              simple: abc
          - unmarshal:
              json:
                unmarshal-type-name: MyClass
          - set-exchange-pattern: InOut
          - circuit-breaker:
              description:
                text: Another one
                lang: eng
              steps:
              - enrich:
                  expression:
                    simple: ${body}
              - to:
                  uri: dropbox:put
                  parameters:
                    accessToken: '{{accessToken}}'
              - multicast:
                  stop-on-exception: true
                  parallel-processing: true
                  steps:
                  - process:
                      ref: '{{myProcessor}}'
                  - pipeline:
                      steps:
                      - convert-body-to:
                          type: java.lang.String
                          charset: UTF8
                      - validate:
                          simple: ${body} == 100
                      - poll-enrich:
                          expression:
                            simple: ${body}
                          aggregation-strategy: myStrategy
              on-fallback:
                steps:
                - log:
                    message: test
                    logging-level: INFO
                    log-name: yaml
                - idempotent-consumer:
                    idempotent-repository: myRepo
                    simple: ${header.id}
                    steps:
                    - set-body:
                        simple: ola ke ase
          - sort:
              comparator: myComparator
      - do-try:
          steps:
          - set-body:
              simple: abc
          - set-exchange-pattern: InOut
          do-catch:
          - exception:
            - java.io.FileNotFoundException
            - java.io.IOException
            on-when:
              simple: ${body.size()} == 1
            steps:
            - log:
                message: test
                logging-level: INFO
                log-name: yaml
          do-finally:
            steps:
            - enrich:
                expression:
                  simple: ${body}
            - to-d:
                uri: direct
                parameters:
                  name: start
      - to:
          uri: kamelet:sink
"
when ignoring newline differences ('\r\n' == '\n')

https://github.com/KaotoIO/kaoto-backend/actions/runs/3987231470/jobs/6836776830#step:5:11549

Environment (please complete the following information):

Additional context
Add any other context about the problem here.

@apupier apupier added the bug Something isn't working label Jan 23, 2023
@stale
Copy link

stale bot commented Mar 24, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Mar 24, 2023
@stale
Copy link

stale bot commented Apr 23, 2023

This has been closed due to inactivity. If you want to further pursue this development, please reopen it again adding the new information.

@stale stale bot closed this as completed Apr 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant