aldettinger commented on PR #183:
URL: 
https://github.com/apache/camel-quarkus-examples/pull/183#issuecomment-1829912415

   @spatnity Yes sure. Let's try to explain better. In the mentioned 
[commit](https://github.com/apache/camel-quarkus-examples/pull/183/files#diff-cb496e7b34f628e54aef57972f5bf8b2a122477f942147f9b5160553218e8a91R35),
 the 
[period](https://camel.apache.org/components/4.0.x/timer-component.html#_endpoint_query_option_period)
 endpoint query option of the timer component has value `10000` ms. This is 
good as when we execute the route, we see messages at a human friendly pace.
   
   However, during tests we also wait for 10s at least, it's quite long. So the 
idea would be to have `timer.period` value of 100ms only during tests, e.g. 
during `mvn clean test`. Overriding configuration during tests is a common 
trick commonly used. An example of such trick could be found in the 
`jpa-idempotent-repository` folder:
   
   ```
   [main_upstream @ jpa-idempotent-repository]$ grep -R timer.period
   src/main/java/org/acme/jpa/idempotent/repository/ExampleHarnessRoutes.java:  
      
from("timer:createExampleInputFiles?delay={{timer.delay}}&period={{timer.period}}&repeatCount={{timer.repeatCount}}")
   src/main/resources/application.properties:timer.period = 10000
   src/test/java/org/acme/jpa/idempotent/repository/DerbyTestResource.java:     
               "jdbc:derby://localhost:" + container.getMappedPort(DERBY_PORT) 
+ "/my-db", "timer.period", "100",
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to