Otavio Rodolfo Piske created CAMEL-19986:
--------------------------------------------

             Summary: tests: create throtling executor
                 Key: CAMEL-19986
                 URL: https://issues.apache.org/jira/browse/CAMEL-19986
             Project: Camel
          Issue Type: Task
          Components: tests
            Reporter: Otavio Rodolfo Piske


In many parts of our tests we use sleeps to throttle the test execution (i.e.: 
like sending those at a certain interval). In some cases, such as overloaded 
nodes, they may not behave as predictably as we would like.

It would be better to, first isolate this throttling in a separate method and 
later research if we can implement something that adapts to the system. 

This ticket is about consolidating that code in a separate utility. 

For instance, to print some message 10 times, every 1 second, we could do 
something like this:

{code:java}
execute(10).slowly( 1, TimeUnit.SECONDS, () -> System.out.prinln("Executes 
every 1 second"));  
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to