You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ltsallas <le...@yahoo.com> on 2012/12/20 21:09:34 UTC

Debugging file component - breakpoint

Hi, 

I am debugging some unit tests with routes using the file component
consumer. When stopping on  a breakpoint  after a while I am getting. 

2012-12-20 21:38:22,750 [main                ]  INFO 
DefaultShutdownStrategy        - Starting to graceful shutdown 1 routes
(timeout 10 seconds)
2012-12-20 21:38:22,757 [ - ShutdownTask] INFO  DefaultShutdownStrategy       
- Waiting as there are still 1 inflight and pending exchanges to complete,
timeout in 10 seconds.
....
....
2012-12-20 21:38:32,756 [main                ] WARN  DefaultShutdownStrategy       
- Timeout occurred. Now forcing the routes to be shutdown now.

And the routes are shutting down. 

Can I somehow avoid this situation?



--
View this message in context: http://camel.465427.n5.nabble.com/Debugging-file-component-breakpoint-tp5724468.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Debugging file component - breakpoint

Posted by ltsallas <le...@yahoo.com>.
Thanks for the answers.

I used an extended Thread.sleep and it works fine.





--
View this message in context: http://camel.465427.n5.nabble.com/Debugging-file-component-breakpoint-tp5724468p5724486.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Debugging file component - breakpoint

Posted by Willem jiang <wi...@gmail.com>.
That's it,

If you want to debug the unit test, you may consider to add Thread.sleep(xxx) to make the unit test wait for you. Otherwise, camel context will be shutdown when the test is finished.  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem




On Friday, December 21, 2012 at 6:36 AM, Raul Kripalani wrote:

> Are you by any chance running this inside a unit test?
>  
> Beware that the assertion waits for some time for expectations to be
> fulfilled (I think 10 secs).
>  
> Therefore it's possible that your test code is finalising while you debug.
>  
> Check out the setAssertPeriod method in Mock endpoint [1].
>  
> Regards,
> Raúl.
>  
> [1]
> http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/component/mock/MockEndpoint.html
> On 20 Dec 2012 20:10, "ltsallas" <lefdev@yahoo.com (mailto:lefdev@yahoo.com)> wrote:
>  
> > Hi,
> >  
> > I am debugging some unit tests with routes using the file component
> > consumer. When stopping on a breakpoint after a while I am getting.
> >  
> > 2012-12-20 21:38:22,750 [main ] INFO
> > DefaultShutdownStrategy - Starting to graceful shutdown 1 routes
> > (timeout 10 seconds)
> > 2012-12-20 21:38:22,757 [ - ShutdownTask] INFO DefaultShutdownStrategy
> > - Waiting as there are still 1 inflight and pending exchanges to complete,
> > timeout in 10 seconds.
> > ....
> > ....
> > 2012-12-20 21:38:32,756 [main ] WARN
> > DefaultShutdownStrategy
> > - Timeout occurred. Now forcing the routes to be shutdown now.
> >  
> > And the routes are shutting down.
> >  
> > Can I somehow avoid this situation?
> >  
> >  
> >  
> > --
> > View this message in context:
> > http://camel.465427.n5.nabble.com/Debugging-file-component-breakpoint-tp5724468.html
> > Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
>  




Re: Debugging file component - breakpoint

Posted by Raul Kripalani <ra...@evosent.com>.
Are you by any chance running this inside a unit test?

Beware that the assertion waits for some time for expectations to be
fulfilled (I think 10 secs).

Therefore it's possible that your test code is finalising while you debug.

Check out the setAssertPeriod method in Mock endpoint [1].

Regards,
Raúl.

[1]
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/component/mock/MockEndpoint.html
 On 20 Dec 2012 20:10, "ltsallas" <le...@yahoo.com> wrote:

> Hi,
>
> I am debugging some unit tests with routes using the file component
> consumer. When stopping on  a breakpoint  after a while I am getting.
>
> 2012-12-20 21:38:22,750 [main                ]  INFO
> DefaultShutdownStrategy        - Starting to graceful shutdown 1 routes
> (timeout 10 seconds)
> 2012-12-20 21:38:22,757 [ - ShutdownTask] INFO  DefaultShutdownStrategy
> - Waiting as there are still 1 inflight and pending exchanges to complete,
> timeout in 10 seconds.
> ....
> ....
> 2012-12-20 21:38:32,756 [main                ] WARN
>  DefaultShutdownStrategy
> - Timeout occurred. Now forcing the routes to be shutdown now.
>
> And the routes are shutting down.
>
> Can I somehow avoid this situation?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Debugging-file-component-breakpoint-tp5724468.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Debugging file component - breakpoint

Posted by Christian Müller <ch...@gmail.com>.
Read the doc http://camel.apache.org/graceful-shutdown.html

Best,
Christian

On Thu, Dec 20, 2012 at 9:09 PM, ltsallas <le...@yahoo.com> wrote:

> DefaultShutdownStrategy




--