Author: davsclaus
Date: Thu Nov 11 07:35:47 2010
New Revision: 1033828

URL: http://svn.apache.org/viewvc?rev=1033828&view=rev
Log:
Fixed test

Modified:
    
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/seda/SedaTest.java

Modified: 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/seda/SedaTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/seda/SedaTest.java?rev=1033828&r1=1033827&r2=1033828&view=diff
==============================================================================
--- 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/seda/SedaTest.java
 (original)
+++ 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/seda/SedaTest.java
 Thu Nov 11 07:35:47 2010
@@ -51,12 +51,16 @@ public class SedaTest extends OSGiIntegr
     @Test
     public void testCamelContextName() throws Exception {
         // should get the context name with osgi bundle id
-        assertTrue("Get the wrong camel context name.", 
context.getName().indexOf("-1") > 0);
-        assertTrue("Get the wrong camel context name.", 
context.getName().indexOf("camel-1") < 0);
-        
+        String name1 = context.getName();
+
         CamelContext context2 = createCamelContext();
-        assertTrue("Get the wrong camel context name.", 
context2.getName().indexOf("-2") > 0);
-        assertTrue("Get the wrong camel context name.", 
context2.getName().indexOf("camel-2") < 0);
+        String name2 = context2.getName();
+
+        assertNotSame(name1, name2);
+
+        String id = "" + bundleContext.getBundle().getBundleId();
+        assertTrue(name1.startsWith(id));
+        assertTrue(name2.startsWith(id));
     }
    
 }
\ No newline at end of file


Reply via email to