You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2013/10/08 09:10:08 UTC

[2/7] git commit: CAMEL-6835 CamelBlueprintTestSupport should provide option of not generating test bundle

CAMEL-6835 CamelBlueprintTestSupport should provide option of not generating test bundle


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/196fe197
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/196fe197
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/196fe197

Branch: refs/heads/camel-2.12.x
Commit: 196fe197a4d985f3226a86f360d9a15aebd1605f
Parents: f1f69f0
Author: Willem Jiang <ni...@apache.org>
Authored: Tue Oct 8 13:14:36 2013 +0800
Committer: Willem Jiang <ni...@apache.org>
Committed: Tue Oct 8 15:00:02 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/196fe197/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 cce7a8e..8c5bd00 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
@@ -47,13 +47,19 @@ public abstract class CamelBlueprintTestSupport extends CamelTestSupport {
     private static ThreadLocal<BundleContext> threadLocalBundleContext = new ThreadLocal<BundleContext>();
     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();