[
https://issues.apache.org/jira/browse/CAMEL-19549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18091102#comment-18091102
]
Otavio Rodolfo Piske commented on CAMEL-19549:
----------------------------------------------
Thanks for looking at this [~tmielke]. If the usage is similar to that, then I
don't think it's worth reviewing the rest of them. Simulating an specific
passage of time seems like a valid reason for those to me.
So, I think you should open the pr with the improvements you have and we can
close this ticket as "Won't fix - valid use cases".
> camel-core: replace Thread.sleep in tests
> -----------------------------------------
>
> Key: CAMEL-19549
> URL: https://issues.apache.org/jira/browse/CAMEL-19549
> Project: Camel
> Issue Type: Task
> Components: camel-core, tests
> Affects Versions: 4.0.0
> Reporter: Otavio Rodolfo Piske
> Priority: Minor
> Labels: easy, help-wanted
>
> We have many tests which use Thread.sleep for synchronization. This is bug
> prone and can introduce flakiness when running on environments with different
> capacities.
> Ideally we should replace these with:
> * [Awaitility|http://www.awaitility.org/]
> * Java's native syncronization mechanism (Latches, Phasers, Locks, etc)
> * Nothing (i.e.; in some cases the sleep can simply be removed)
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)