Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13642

Testing for an expected Header in a MockEndpoint doesnt happen if there is no Exchange received

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.21.0
    • 2.23.4, 2.24.2, 2.25.0
    • None
    • None
    • Unknown

    Description

      Context

      When we have a MockEndpoint that expects for any header to be received, now there is no error raised if there is no Exchange received.

      So , it only checks for the expression if there is an Exchange, therefore the test doesn't fail.

      Where 

      MockEndpoint.expectedHeaderReceived:519

      Fix

      Add an assert for getReceivedExchanges > 0

      Attachments

        Activity

          People

            Unassigned Unassigned
            jonvila Jonathan Vila
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: