I have found a weird/funny bug with CamelBlueprintTestSupport, I thought I
share. I briefly looked at the source code but cannot see any obvious
culprit so I thought I post it here if anyone feels like a challenge.

Basically when I git-clone a project in a directory that is at most 5 levels
deep from root directory, the blueprint test passes. But if it is cloned to
a directory which is 6 levels or more, the blueprint fails to start. (As you
can imagine, it took me ages to figure out this was the case!)

I narrowed down the problem to blueprint config admin not being initialised
properly. Then I looked at the source code for CamelBlueprintTestSupport and
realised it uses hardcoded relative paths like "target/etc".

https://github.com/apache/camel/blob/master/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java#L523

Here is the thing: I am using Gradle; there is no "target" directory! It
does get created as part of the blueprint test though.

The $1M question is why is 6 directories deep is significant in all this?!
It definitely is not the string length of the absolute path as I tried a
really long path, but only 5 levels deep, and the blueprint started fine.

*If anyone else encountered this, the work-around is to use "target"
directory as the Gradle's buildDir; then the test passes in any directory!*

I'll investigate it further once I get some free time but double you tee
eff!



--
View this message in context: 
http://camel.465427.n5.nabble.com/CamelBlueprintTestSupport-doesn-t-like-6-directories-deep-tp5787192.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to