You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2011/03/01 09:57:36 UTC

[jira] Created: (CAMEL-3733) CamelContextTestSupport class should start the camel context even it doesn't use the RouteBuilder

CamelContextTestSupport class should start the camel context even it doesn't use the RouteBuilder
-------------------------------------------------------------------------------------------------

                 Key: CAMEL-3733
                 URL: https://issues.apache.org/jira/browse/CAMEL-3733
             Project: Camel
          Issue Type: Bug
          Components: camel-core, camel-test
    Affects Versions: 2.6.0, 2.5.0, 2.4.0
            Reporter: Willem Jiang
            Assignee: Willem Jiang
             Fix For: 2.7.0


Current CamelContextTestSupport class will not start the camelcontext if the isUseRouteBuilder() return false.
If the component that is used by template needs to be started, your test method will get the NPE or some strange error.
And you can these load when shutting down the camel context.
{code}
Mar 1, 2011 4:31:29 PM org.apache.camel.test.junit4.CamelTestSupport tearDown
INFO: Testing done: com.fusesource.example.camel.cxf.jms.HelloWorldClient@e49d67c
Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext:camel-1) is shutting down
Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext createManagementStrategy
INFO: JMX is disabled. Using DefaultManagementStrategy.
Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
INFO: Starting to graceful shutdown 0 routes (timeout 10 seconds)
Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
INFO: Graceful shutdown of 0 routes completed in 0 seconds
Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
INFO: Uptime: not started
Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext: camel-1) is shutdown in 0.023 seconds
{code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CAMEL-3733) CamelContextTestSupport class should start the camel context even it doesn't use the RouteBuilder

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang updated CAMEL-3733:
--------------------------------

    Priority: Minor  (was: Major)

Current lots of camel tests are relay on if the isUseRouteBuilder return false, the test method should start the camel context itself , so I just add a comments on the isUseRouteBuilder method to tell user to start the CamelContext in their test method.

> CamelContextTestSupport class should start the camel context even it doesn't use the RouteBuilder
> -------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3733
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3733
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-test
>    Affects Versions: 2.4.0, 2.5.0, 2.6.0
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.7.0
>
>
> Current CamelContextTestSupport class will not start the camelcontext if the isUseRouteBuilder() return false.
> If the component that is used by template needs to be started, your test method will get the NPE or some strange error.
> And you can these load when shutting down the camel context.
> {code}
> Mar 1, 2011 4:31:29 PM org.apache.camel.test.junit4.CamelTestSupport tearDown
> INFO: Testing done: com.fusesource.example.camel.cxf.jms.HelloWorldClient@e49d67c
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext:camel-1) is shutting down
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext createManagementStrategy
> INFO: JMX is disabled. Using DefaultManagementStrategy.
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
> INFO: Starting to graceful shutdown 0 routes (timeout 10 seconds)
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
> INFO: Graceful shutdown of 0 routes completed in 0 seconds
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Uptime: not started
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext: camel-1) is shutdown in 0.023 seconds
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CAMEL-3733) Add comments on the CamelContextTestSupport class to tell user to start the camel context manually when the test doesn't use the RouteBuilder

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang updated CAMEL-3733:
--------------------------------

    Summary: Add comments on the CamelContextTestSupport class to tell user to start the camel context manually when the test doesn't use the RouteBuilder  (was: CamelContextTestSupport class should start the camel context even it doesn't use the RouteBuilder)

> Add comments on the CamelContextTestSupport class to tell user to start the camel context manually when the test doesn't use the RouteBuilder
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3733
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3733
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-test
>    Affects Versions: 2.4.0, 2.5.0, 2.6.0
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.7.0
>
>
> Current CamelContextTestSupport class will not start the camelcontext if the isUseRouteBuilder() return false.
> If the component that is used by template needs to be started, your test method will get the NPE or some strange error.
> And you can these load when shutting down the camel context.
> {code}
> Mar 1, 2011 4:31:29 PM org.apache.camel.test.junit4.CamelTestSupport tearDown
> INFO: Testing done: com.fusesource.example.camel.cxf.jms.HelloWorldClient@e49d67c
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext:camel-1) is shutting down
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext createManagementStrategy
> INFO: JMX is disabled. Using DefaultManagementStrategy.
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
> INFO: Starting to graceful shutdown 0 routes (timeout 10 seconds)
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
> INFO: Graceful shutdown of 0 routes completed in 0 seconds
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Uptime: not started
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext: camel-1) is shutdown in 0.023 seconds
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (CAMEL-3733) Add comments on the CamelContextTestSupport class to tell user to start the camel context manually when the test doesn't use the RouteBuilder

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-3733.
--------------------------------

    Resolution: Fixed

> Add comments on the CamelContextTestSupport class to tell user to start the camel context manually when the test doesn't use the RouteBuilder
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3733
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3733
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-test
>    Affects Versions: 2.4.0, 2.5.0, 2.6.0
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.7.0
>
>
> Current CamelContextTestSupport class will not start the camelcontext if the isUseRouteBuilder() return false.
> If the component that is used by template needs to be started, your test method will get the NPE or some strange error.
> And you can these load when shutting down the camel context.
> {code}
> Mar 1, 2011 4:31:29 PM org.apache.camel.test.junit4.CamelTestSupport tearDown
> INFO: Testing done: com.fusesource.example.camel.cxf.jms.HelloWorldClient@e49d67c
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext:camel-1) is shutting down
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext createManagementStrategy
> INFO: JMX is disabled. Using DefaultManagementStrategy.
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
> INFO: Starting to graceful shutdown 0 routes (timeout 10 seconds)
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
> INFO: Graceful shutdown of 0 routes completed in 0 seconds
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Uptime: not started
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext: camel-1) is shutdown in 0.023 seconds
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (CAMEL-3733) CamelContextTestSupport class should start the camel context even it doesn't use the RouteBuilder

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000808#comment-13000808 ] 

Willem Jiang edited comment on CAMEL-3733 at 3/1/11 9:49 AM:
-------------------------------------------------------------

Current lots of camel tests are relay on if the isUseRouteBuilder return false, the test method should start the camel context itself , so I just add a comments on the isUseRouteBuilder method to tell the user to start the CamelContext in their test method manually.

      was (Author: njiang):
    Current lots of camel tests are relay on if the isUseRouteBuilder return false, the test method should start the camel context itself , so I just add a comments on the isUseRouteBuilder method to tell user to start the CamelContext in their test method.
  
> CamelContextTestSupport class should start the camel context even it doesn't use the RouteBuilder
> -------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3733
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3733
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-test
>    Affects Versions: 2.4.0, 2.5.0, 2.6.0
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.7.0
>
>
> Current CamelContextTestSupport class will not start the camelcontext if the isUseRouteBuilder() return false.
> If the component that is used by template needs to be started, your test method will get the NPE or some strange error.
> And you can these load when shutting down the camel context.
> {code}
> Mar 1, 2011 4:31:29 PM org.apache.camel.test.junit4.CamelTestSupport tearDown
> INFO: Testing done: com.fusesource.example.camel.cxf.jms.HelloWorldClient@e49d67c
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext:camel-1) is shutting down
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext createManagementStrategy
> INFO: JMX is disabled. Using DefaultManagementStrategy.
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
> INFO: Starting to graceful shutdown 0 routes (timeout 10 seconds)
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
> INFO: Graceful shutdown of 0 routes completed in 0 seconds
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Uptime: not started
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext: camel-1) is shutdown in 0.023 seconds
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CAMEL-3733) CamelContextTestSupport class should start the camel context even it doesn't use the RouteBuilder

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-3733:
-------------------------------

    Issue Type: Improvement  (was: Bug)

This is not a bug, but by design. We should add javadoc to the isUseRouteBuilder method that if its false, then the end user must manually start the CamelContext.

> CamelContextTestSupport class should start the camel context even it doesn't use the RouteBuilder
> -------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3733
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3733
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-test
>    Affects Versions: 2.4.0, 2.5.0, 2.6.0
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.7.0
>
>
> Current CamelContextTestSupport class will not start the camelcontext if the isUseRouteBuilder() return false.
> If the component that is used by template needs to be started, your test method will get the NPE or some strange error.
> And you can these load when shutting down the camel context.
> {code}
> Mar 1, 2011 4:31:29 PM org.apache.camel.test.junit4.CamelTestSupport tearDown
> INFO: Testing done: com.fusesource.example.camel.cxf.jms.HelloWorldClient@e49d67c
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext:camel-1) is shutting down
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext createManagementStrategy
> INFO: JMX is disabled. Using DefaultManagementStrategy.
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
> INFO: Starting to graceful shutdown 0 routes (timeout 10 seconds)
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultShutdownStrategy doShutdown
> INFO: Graceful shutdown of 0 routes completed in 0 seconds
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Uptime: not started
> Mar 1, 2011 4:31:29 PM org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Apache Camel 2.6.0-fuse-00-00 (CamelContext: camel-1) is shutdown in 0.023 seconds
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira