Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-19986

tests: create throtling executor

    XMLWordPrintableJSON

Details

    • Novice

    Description

      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:

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

      Attachments

        Activity

          People

            nikita_konovalov Nikita_Konovalov
            orpiske Otavio Rodolfo Piske
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: