You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/04/12 12:53:03 UTC

[GitHub] [camel] essobedo opened a new pull request, #7420: CAMEL-17948: Force waiting before checking the asserts of the mock

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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #7420: CAMEL-17948: Force waiting before checking the asserts of the mock

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7420:
URL: https://github.com/apache/camel/pull/7420#issuecomment-1096767429

   There are too many components to be tested in this PR, components were removed or the code needs a rebase: (22 likely to be tested)


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #7420: CAMEL-17948: Force waiting before checking the asserts of the mock

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7420:
URL: https://github.com/apache/camel/pull/7420#issuecomment-1096762576

   :heavy_check_mark: Finished component verification: 0 component(s) test failed out of **2 component(s) tested**


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] essobedo merged pull request #7420: CAMEL-17948: Force waiting before checking the asserts of the mock

Posted by GitBox <gi...@apache.org>.
essobedo merged PR #7420:
URL: https://github.com/apache/camel/pull/7420


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #7420: CAMEL-17948: Force waiting before checking the asserts of the mock

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7420:
URL: https://github.com/apache/camel/pull/7420#issuecomment-1096779787

   There are too many components to be tested in this PR, components were removed or the code needs a rebase: (22 likely to be tested)


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #7420: CAMEL-17948: Force waiting before checking the asserts of the mock

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7420:
URL: https://github.com/apache/camel/pull/7420#issuecomment-1096690055

   :warning: This PR changes Camel components and will be tested automatically.


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org