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

Subtle test fails due multiple threads involved and visibility issues in mock endpoints

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.7.0
    • camel-core, camel-hawtdb
    • None

    Description

      The test HawtDBAggregateRecoverDeadLetterChannelFailedTest may fail with a header missing. This seems really odd. And tracking this down to a thread visibility issue with the thread performing the assertion on the mock, and threads routing the messages in Camel. State on the mock should be volatile so changes is visible between the threads.

      Also optimize getHeader on Message to check for any headers first, avoiding the lazy create a Map, when really not needed.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: