Hi Scott

Well spotted. Logged a ticket to get this fixed
https://issues.apache.org/jira/browse/CAMEL-6693

Feel free to submit and unit test based on your source code. I
couldn't grab that as its your copyright :)
But feel free to contribute an unit test that is .. I guess would be
identical to your book source code test. So we can have it tested for
any future regressions.


On Fri, Aug 30, 2013 at 6:14 PM, Scott Cranton <sc...@cranton.com> wrote:
> Adding back in lines 356 & 357 seems to get back to 2.11.1 behavior
>
> https://github.com/apache/camel/blob/camel-2.11.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java#L357
>
> Camel-6576 seems to have subtlety changed the behavior from 2.11. Not clear
> to me why the add of the DefaultManagementLifecycleStrategy got removed...
>
> Should I re-open Camel-5676 with a Unit test (if I can create a simple unit
> test) and a patch, OR open a separate issue?
>
> On Fri, Aug 30, 2013 at 10:07 AM, Scott Cranton <sc...@cranton.com> wrote:
>
>> Digging into this, it may be a side effect of CAMEL-6576.
>>
>> DefaultManagementLifecycleStrategy.onContextStart sets the CamelContext
>> ManagementName
>>
>> In 2.11.1, the first time I see any lifecycleStrategies is for my unit
>> test - context name = camel-25 - and it sets the managementName correctly
>>
>> In 2.12.0, on the very first CamelContext - context name = camel-1 - is
>> the only time I see a ManagementLifecycleStrategy. For camel-25 (my unit
>> test), no lifecycleStrategies exist, and the managementName == null...
>>
>> I'm going to keep digging, but it feels like in 2.12.0 camelContext start
>> and stop need to interact more with the managementLifecycleStrategy to help
>> ensure the name gets set correctly...
>>
>>
>> On Fri, Aug 30, 2013 at 8:48 AM, Claus Ibsen <claus.ib...@gmail.com>wrote:
>>
>>> Hi
>>>
>>> Ah you are doing it a bit wrong in your createCamelContext.
>>>
>>> As you call super.createContext which then creates the Camel and
>>> enlist it in JMX and whatnot. Then after the super you change the JMX
>>> stuff.
>>>
>>> What you should do is like we do in
>>> org.apache.camel.management.ManagementTestSupport
>>>
>>> from camel-core unit tests. Take a look at that class and then it ought
>>> to work.
>>>
>>> On Fri, Aug 30, 2013 at 2:28 PM, Scott Cranton <sc...@cranton.com> wrote:
>>> > Claus,
>>> >
>>> > It could be left over state, but the odd bit is everything works fine
>>> with
>>> > 2.11.1... that one test fails when I tried against 2.12.0.
>>> >
>>> > That unit test is then followed by other JMX unit tests that work, so
>>> > somehow the Platform mbean server is started for later tests; perhaps a
>>> > timing issue...
>>> >
>>> > I'll try to dig into it more...
>>> >
>>> > Are there any hooks such that I can wait till the JMS server is running
>>> > and/or validate its startup state?
>>> >
>>> > Thanks,
>>> > Scott
>>> >
>>> >
>>> > On Fri, Aug 30, 2013 at 8:08 AM, Claus Ibsen <claus.ib...@gmail.com>
>>> wrote:
>>> >
>>> >> Maybe there is some leftover state from previous test. I assume you do
>>> >> not for per test, but run all the tests in the same JVM. Otherwise you
>>> >> can try setting surefire plugin to fork per test. Then the test ought
>>> >> to pass. if so then its likely some leftover state from previous test
>>> >> or something that causes a side-effect.
>>> >>
>>> >>
>>> >>
>>> >> On Fri, Aug 30, 2013 at 1:07 PM, Scott Cranton <sc...@cranton.com>
>>> wrote:
>>> >> > I should have been clearer that it fails at line 67 of that unit test
>>> >> > against the 2.12.0 release candidate only when you run the full
>>> build or
>>> >> > when you build the camel-cookbook-monitoring module.
>>> >> >
>>> >> >
>>> >>
>>> https://github.com/CamelCookbook/camel-cookbook-examples/blob/master/camel-cookbook-monitoring/src/test/java/org/camelcookbook/monitoring/managed/ManagedSpringTest.java#L67
>>> >> >
>>> >> >
>>> >> > On Fri, Aug 30, 2013 at 7:04 AM, Scott Cranton <sc...@cranton.com>
>>> >> wrote:
>>> >> >
>>> >> >> I have one JMX unit test that runs in 2.11.1, but now fails in
>>> 2.12.0.
>>> >> The
>>> >> >> CamelContext.getManagementName is returning null, but only when the
>>> unit
>>> >> >> test is run as part of the larger build -- it works fine standalone.
>>> >> >>
>>> >> >>
>>> >> >>
>>> >>
>>> https://github.com/CamelCookbook/camel-cookbook-examples/blob/master/camel-cookbook-monitoring/src/test/java/org/camelcookbook/monitoring/managed/ManagedSpringTest.java
>>> >> >>
>>> >> >> Its likely that I've got something wrong in my unit test, though I
>>> saw
>>> >> >> funny behavior in 2.11 where I had to explicitly enable the Platform
>>> >> MBean
>>> >> >> server (System.setProperty(JmxSystemPropertyKeys.DISABLED, "false"))
>>> >> >> otherwise the larger build would fail - that is one unit test would
>>> >> disable
>>> >> >> it, and spill over to other test. Again, may just be that I need to
>>> >> isolate
>>> >> >> my tests better...
>>> >> >>
>>> >> >> Good news is the 500+ other Camel unit tests run fine...
>>> >> >>
>>> >> >> Thoughts on what's up with that one JMX unit test?
>>> >> >>
>>> >> >>
>>> >> >> On Fri, Aug 30, 2013 at 5:51 AM, Willem jiang <
>>> willem.ji...@gmail.com
>>> >> >wrote:
>>> >> >>
>>> >> >>> Most tests are covered by the unit tests which can be ran by
>>> Jenkins.
>>> >> >>> Now we need to run some manual test on the release candidate kit.
>>> >> >>>
>>> >> >>>
>>> >> >>> --
>>> >> >>> Willem Jiang
>>> >> >>>
>>> >> >>> Red Hat, Inc.
>>> >> >>> Web: 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, August 30, 2013 at 3:34 PM, Jan Matèrne (jhm) wrote:
>>> >> >>>
>>> >> >>> > Couldnt these tests not be automated using Jenkins or Gump?
>>> >> >>> >
>>> >> >>> > Jan
>>> >> >>> >
>>> >> >>> > > -----Ursprüngliche Nachricht-----
>>> >> >>> > > Von: Claus Ibsen [mailto:claus.ib...@gmail.com]
>>> >> >>> > > Gesendet: Freitag, 30. August 2013 09:26
>>> >> >>> > > An: dev
>>> >> >>> > > Betreff: Re: [VOTE] Release Apache Camel 2.12.0
>>> >> >>> > >
>>> >> >>> > > Hi
>>> >> >>> > >
>>> >> >>> > > I tested this release with the camel-extra source code and that
>>> >> worked
>>> >> >>> > > fine.
>>> >> >>> > > I also tried some of the examples from the Camel 2.12
>>> distribution.
>>> >> >>> > >
>>> >> >>> > > Though have not (yet) tried any of the OSGi examples in Apache
>>> >> Karaf
>>> >> >>> > > 2.3.2.
>>> >> >>> > >
>>> >> >>> > > Also noticed that the doc folder holds the html of the manual.
>>> The
>>> >> pdf
>>> >> >>> > > is gone which is expected.
>>> >> >>> > > So that looks good also.
>>> >> >>> > >
>>> >> >>> > > Though in the lib folder we have included
>>> >> camel-core-2.12.0-tests.jar
>>> >> >>> > >
>>> >> >>> > > This should IMHO be removed. Its 5.6MB and was not released
>>> >> >>> previously.
>>> >> >>> > > This JAR is ONLY for internal testing of Camel. Camel end
>>> users can
>>> >> >>> use
>>> >> >>> > > the camel-xxx-test JARs for testing their Camel apps.
>>> >> >>> > >
>>> >> >>> > > This also means the size of the distro jumps from 7.4mb ->
>>> 12mb (eg
>>> >> >>> > > 2.11.1 -> 2.12.0)
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > > On Wed, Aug 28, 2013 at 11:45 AM, Willem jiang <
>>> >> >>> willem.ji...@gmail.com (mailto:willem.ji...@gmail.com)>
>>> >> >>> > > wrote:
>>> >> >>> > > > After 5 month of development, we have a new minor release
>>> >> candidate
>>> >> >>> > > > apache-camel-2.12.0 ready.
>>> >> >>> > > > It comes with 320 issues resolved: new features,
>>> improvements and
>>> >> >>> bug
>>> >> >>> > > > fixes [1]. You can find the release notes here [2].
>>> >> >>> > > >
>>> >> >>> > > > Please find the staging repo here:
>>> >> >>> > > >
>>> >> https://repository.apache.org/content/repositories/orgapachecamel-
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > > 119/
>>> >> >>> > > >
>>> >> >>> > > > The tarballs are here
>>> >> >>> > > >
>>> >> https://repository.apache.org/content/repositories/orgapachecamel-
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > > 119/
>>> >> >>> > > > org/apache/camel/apache-camel/2.12.0/
>>> >> >>> > > >
>>> >> >>> > > > Tag:
>>> >> >>> > > > https://git-wip-
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > > us.apache.org/repos/asf?p=camel.git;a=tag;h=af4c05ec6d (
>>> >> >>> http://us.apache.org/repos/asf?p=camel.git;a=tag;h=af4c05ec6d)
>>> >> >>> > > > f0f1d562a8d21d0355678ca3a892d4
>>> >> >>> > > >
>>> >> >>> > > > Please review, help out with testing and vote to approve this
>>> >> >>> release
>>> >> >>> > > > binary. Please mention what you tested to prevent duplicate
>>> work.
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > > Your
>>> >> >>> > > > vote counts!
>>> >> >>> > > >
>>> >> >>> > > > [ ] +1 Release the binary as Apache Camel 2.12.0 [ ] -1 Veto
>>> the
>>> >> >>> > > > release (provide specific comments) Vote is open for at
>>> least 72
>>> >> >>> > > > hours.
>>> >> >>> > > >
>>> >> >>> > > > Thanks in advance,
>>> >> >>> > > > Willem
>>> >> >>> > > >
>>> >> >>> > > > [1]
>>> >> >>> > >
>>> >> >>>
>>> https://issues.apache.org/jira/issues/?jql=project%20%3D%20CAMEL%20AND
>>> >> >>> > > > %20fixVersion%20%3D%20%222.12.0%22
>>> >> >>> > > > [2]
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>>
>>> https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=1232396
>>> >> >>> > > > 8&projectId=12311211
>>> >> >>> > > >
>>> >> >>> > > >
>>> >> >>> > > >
>>> >> >>> > > > --
>>> >> >>> > > > Willem Jiang
>>> >> >>> > > >
>>> >> >>> > > > Red Hat, Inc.
>>> >> >>> > > > Web: 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
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > >
>>> >> >>> > > --
>>> >> >>> > > Claus Ibsen
>>> >> >>> > > -----------------
>>> >> >>> > > Red Hat, Inc.
>>> >> >>> > > Email: cib...@redhat.com (mailto:cib...@redhat.com)
>>> >> >>> > > Twitter: davsclaus
>>> >> >>> > > Blog: http://davsclaus.com
>>> >> >>> > > Author of Camel in Action: http://www.manning.com/ibsen
>>> >> >>> >
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Claus Ibsen
>>> >> -----------------
>>> >> Red Hat, Inc.
>>> >> Email: cib...@redhat.com
>>> >> Twitter: davsclaus
>>> >> Blog: http://davsclaus.com
>>> >> Author of Camel in Action: http://www.manning.com/ibsen
>>> >>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -----------------
>>> Red Hat, Inc.
>>> Email: cib...@redhat.com
>>> Twitter: davsclaus
>>> Blog: http://davsclaus.com
>>> Author of Camel in Action: http://www.manning.com/ibsen
>>>
>>
>>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to