Wednesday 15 February 2012

junit - How can you unit test Apache Cache Timer routes? -


Using Apache camel 2.9.1

How can I test something like the following? some.endpoint}} ".end () (" timer.somethingelse? Delay = 3000 & period = 1000 ") // do some things .to (" {{ Some.other.endpoint}} ") .end}}

What is the same You want to test the unit here because it is not a clock clock component for the unit (I mean unit testing if it is triggered or not; and if its properties should work as it should be): Camel Team has already done this

Tarki for unit testing What is "// some stuff" part, which you do by joking the end points. Your first route will be automatically removed, while the second time will be with the initial delay, you have to emphasize anything at least In such cases, I generally read the properties of files such as Android properties such as "timer: ameles? {{2nd.timer.properties}} ")

and it can be set to

  2nd.timer.properties = delay = 3000 & Amp; period = 1000 // in prod 2nd.timer.properties = delay = 0 // time trial   

so that it can start even on a startup. Hopefully it helps, < / P>

Serious

No comments:

Post a Comment