Hi Alex,

  It seems the timeout is tuned after the context creation. One may achieve
the desired result with either:
@Override
protected void doPostSetup() throws Exception {
  context.getShutdownStrategy().setTimeout(60);
}
OR MAYBE
@Override
protected int getShutdowntimeout() {
  return 60;
}

hth,
Alex



On Tue, Aug 18, 2020 at 3:23 PM Alex Soto <alex.s...@envieta.com> wrote:

> Hello,
>
> Using Camel 3.4.0, in my unit test, I am trying to configure the shutdown
> timeout doing the following:
>
>    public class MyTest extends CamelTestSupport {
>                 . . .
>
>         @Override
>         protected CamelContext createCamelContext() throws Exception {
>                 CamelContext result = super.createCamelContext();
>
>
> result.getExecutorServiceManager().setShutdownAwaitTermination(30_000);
>                 result.getShutdownStrategy().setTimeout(60);
>
>                 return result;
>         }
>
>
> However,  I still see the default timeout of 10 seconds in the logs:
>
> 2020-08-17 20:58:16,726 [main] INFO
> org.apache.camel.impl.engine.DefaultShutdownStrategy  - Starting to
> graceful shutdown 1 routes (timeout 10 seconds)
>
> Any idea how to properly configure the shutdown timeout?
>
> Also, I would like to know how  to do it with Blueprint XML
>
>
> Best regards,
> Alex soto
>
>
>
>
>

Reply via email to