essobedo opened a new pull request, #7420: URL: https://github.com/apache/camel/pull/7420
Fix for https://issues.apache.org/jira/browse/CAMEL-17948 ## Motivation While working on [CAMEL-17945](https://issues.apache.org/jira/browse/CAMEL-17945), I realized that the tests with the scope PER_CLASS leveraging the MockEndpoint to define their assertions can fail randomly because of a race condition issue. Indeed, with the current code, a message of a previous test method can potentially call the method countDown on the latch of the following test method causing unexpected behavior. ## Modifications: * When at least one message is expected, always wait until the latch is released to prevent conflicts of messages of different test methods * Convert the counter to an `AtomicInteger` to guarantee the rest of an increment * Use a fixed value of the counter when getting the `Processor` to avoid potential race condition issues between 2 successive accesses * Add the new method `expectedNoHeaderReceived` to check if the received message has no headers (not related to the initial issue but needed for CAMEL-17945) * Add the new method `assertFalse` to check if a given predicate is `false` (not related to the initial issue but needed for CAMEL-17945) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org