You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2014/06/26 20:08:43 UTC

[2/4] git commit: Fixed OSGi test

Fixed OSGi test


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

Branch: refs/heads/master
Commit: 559197e609eabdd573415acacae83845e30b556b
Parents: d1ae838
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Jun 26 20:05:55 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Jun 26 20:05:55 2014 +0200

----------------------------------------------------------------------
 .../itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/559197e6/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java
index e82ee48..c9f77c5 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java
@@ -36,7 +36,7 @@ import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
 @RunWith(JUnit4TestRunner.class)
 public class OSGiBlueprintHelloWorldTest extends OSGiBlueprintTestSupport {
 
-    private String name = OSGiBlueprintHelloWorldTest.class.getName();
+    private static final String NAME = OSGiBlueprintHelloWorldTest.class.getName();
 
     @Override
     public void setUp() throws Exception {
@@ -47,12 +47,10 @@ public class OSGiBlueprintHelloWorldTest extends OSGiBlueprintTestSupport {
     @Test
     public void testHelloWorld() throws Exception {
         // start bundle
-        getInstalledBundle(name).start();
+        getInstalledBundle(NAME).start();
 
         // must use the camel context from osgi
-        CamelContext ctx = getOsgiService(CamelContext.class, 
-               //"(camel.context.symbolicname=" + name + ")"
-               "camel.context.name=camel1", 10000);
+        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=" + NAME + ")", 10000);
 
         ProducerTemplate myTemplate = ctx.createProducerTemplate();
         myTemplate.start();
@@ -76,7 +74,7 @@ public class OSGiBlueprintHelloWorldTest extends OSGiBlueprintTestSupport {
 
                 bundle(newBundle()
                         .add("OSGI-INF/blueprint/test.xml", OSGiBlueprintTestSupport.class.getResource("blueprint-13.xml"))
-                        .set(Constants.BUNDLE_SYMBOLICNAME, OSGiBlueprintHelloWorldTest.class.getName())
+                        .set(Constants.BUNDLE_SYMBOLICNAME, NAME)
                         .build()).noStart(),
                 
                 // using the features to install the camel components