Author: davsclaus
Date: Tue Feb 28 12:28:40 2012
New Revision: 1294620

URL: http://svn.apache.org/viewvc?rev=1294620&view=rev
Log:
CAMEL-5042: Fixed test

Modified:
    
camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedSedaRouteRemoveTest.java

Modified: 
camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedSedaRouteRemoveTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedSedaRouteRemoveTest.java?rev=1294620&r1=1294619&r2=1294620&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedSedaRouteRemoveTest.java
 (original)
+++ 
camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedSedaRouteRemoveTest.java
 Tue Feb 28 12:28:40 2012
@@ -46,7 +46,6 @@ public class ManagedSedaRouteRemoveTest 
 
         // and there should be 2 thread pools (1 default + 1 seda)
         Set<ObjectName> set = mbeanServer.queryNames(new 
ObjectName("*:type=threadpools,*"), null);
-        assertEquals(2, set.size());
         // there should be a seda thread pool in there
         boolean seda = false;
         for (ObjectName names : set) {
@@ -76,10 +75,15 @@ public class ManagedSedaRouteRemoveTest 
 
         // and thread pool should be removed (shutdown creates a new thread 
pool as well)
         set = mbeanServer.queryNames(new ObjectName("*:type=threadpools,*"), 
null);
-        assertEquals(1, set.size());
-        // and the thread pool should not be a seda thread pool
-        String name = set.iterator().next().toString();
-        assertFalse("There should not be a seda thread pool", 
name.contains("Seda"));
+        // there should NOT be a seda thread pool in there
+        seda = false;
+        for (ObjectName names : set) {
+            if (names.toString().contains("Seda")) {
+                seda = true;
+                break;
+            }
+        }
+        assertFalse("There should not be a seda thread pool", seda);
     }
 
     static ObjectName getRouteObjectName(MBeanServer mbeanServer) throws 
Exception {


Reply via email to