CAMEL-6835 CamelBlueprintTestSupport should provide option of not generating test bundle
Conflicts: components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/78f0224d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/78f0224d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/78f0224d Branch: refs/heads/camel-2.11.x Commit: 78f0224d0debacf256065d8954632ae92dcf3b43 Parents: 1172570 Author: Willem Jiang <ningji...@apache.org> Authored: Tue Oct 8 15:03:38 2013 +0800 Committer: Willem Jiang <ningji...@apache.org> Committed: Tue Oct 8 15:03:38 2013 +0800 ---------------------------------------------------------------------- .../camel/test/blueprint/CamelBlueprintTestSupport.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/78f0224d/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java ---------------------------------------------------------------------- diff --git a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java index 99a5aed..b3dff16 100644 --- a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java +++ b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java @@ -50,12 +50,18 @@ public abstract class CamelBlueprintTestSupport extends CamelTestSupport { private volatile BundleContext bundleContext; private final Set<ServiceRegistration<?>> services = new LinkedHashSet<ServiceRegistration<?>>(); + // CamelBlueprintTestSupport creates the test bundle which includes blueprint configuration files if the value is true + // You can override the return value to false if you already has the test bundle in your class path + protected boolean includeTestBundle() { + return true; + } + @SuppressWarnings({"rawtypes", "unchecked"}) protected BundleContext createBundleContext() throws Exception { String symbolicName = getClass().getSimpleName(); BundleContext answer = CamelBlueprintHelper.createBundleContext(symbolicName, getBlueprintDescriptor(), - true, getBundleFilter(), getBundleVersion(), getBundleDirectives()); + includeTestBundle(), getBundleFilter(), getBundleVersion(), getBundleDirectives()); // must register override properties early in OSGi containers Properties extra = useOverridePropertiesWithPropertiesComponent();