You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2023/10/13 10:12:00 UTC
[jira] [Created] (CAMEL-19986) tests: create throtling executor
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)