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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.21.0
    • Fix Version/s: 2.23.4, 2.24.2, 2.25.0
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: