I've created a ticket and submitted a patch - https://issues.apache.org/jira/browse/CAMEL-9142 - that fixes the most obvious symptom I was seeing. It looks like 2.15.3 broke the ability of CamelBlueprintTestSupport.getBlueprintDescriptor() to return 2 or more descriptor file references as per the Javadoc, i.e. separate multiple files with a '+'. The patch I submitted changed the CamelBlueprintTestSupport.expectBlueprintContainerReloadOnConfigAdminUpdate method to load file descriptor(s) the same way that camel-blueprint does, that is via the CamelBlueprintHelper.getBlueprintDescriptors method. Patch at https://github.com/apache/camel/pull/616
I'm still seeing some issues with blueprint property overrides not being applied the same way as previous versions of Camel, and I want to verify first that my unit test code would work as expected in a "real" application, i.e. deployed to Karaf, in case the previous blueprint unit test code allowed something that would not work in deployed code. If I continue to see that issue, I'll reopen a new issue. Thanks, Scott On Sat, Sep 5, 2015 at 1:18 PM, Scott Cranton <[email protected]> wrote: > Looking closer at CamelBlueprintTestSupport line 240, its > doing getClass().getClassLoader().getResourceAsStream(descriptor) which I > believe is problematic as CamelBlueprintTestSupport and my blueprint > descriptors are in different bundles and therefore different class > loaders... Though I'd think the unit tests in the Camel source would also > fail then... > > On Sat, Sep 5, 2015 at 1:02 PM, Scott Cranton <[email protected]> wrote: > >> My code from the Apache Camel Developer's Cookbook is now getting an >> error trying to upgrade from Camel 2.15.2 to 2.15.3 around testing the >> Blueprint Property / Test Support. This same code has worked fine over last >> 2 years since version 2.12. With version 2.15.3, I'm seeing a runtime error >> in >> CamelBlueprintTestSupport.expectBlueprintContainerReloadOnConfigAdminUpdate:256 >> where the input stream is null trying to load my blueprint descriptor to >> see if the test harness needs to worry about reload on property update. I'm >> also seeing waiting on namespace handler messages in the log which I >> suspect is the real culprit. >> >> It feels like https://issues.apache.org/jira/browse/CAMEL-8948 tried to >> address this issue, and it looks like there was some fiddling with maven >> dependency order for the aries blueprint jars. I saw that in upgrading from >> 2.15.2 to 2.15.3 I had to add a number of aries dependencies - proxy.api, >> blueprint.api, and blueprint.core - to deal with version mismatches in the >> dependent jars... >> >> I've created a Camel-v2.15.3 branch of this project >> https://github.com/CamelCookbook/camel-cookbook-examples/tree/camel-v2.15.3 >> that fails in the camel-cookbook-testing module in the following unit test >> files all with the same runtime error. Its 8 unit tests across 4 test files >> that are failing. >> >> PropertyOverrideBlueprintTest >> PropertyOverrideEtcBlueprintTest >> SimpleTransformAnnotationsBlueprintTest >> SimpleTransformBlueprintTest >> >> This code has worked fine for last 2 years from 2.12 up to 2.15.2, and >> only broke with 2.15.3, so this feels like a regression within the >> CamelBlueprintTestSupport class. >> >> I did try changing the tests to be synchronous by overriding the >> CamelBlueprintTestSupport.useAsynchronousBlueprintStartup {return false;}, >> but still saw same runtime error. >> >> Thoughts on how to debug or fix? >> >> Thanks, >> Scott >> > >
