camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/3] camel git commit: Fixed tests
Date Thu, 06 Aug 2015 08:13:39 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x cfb6cd629 -> ca7e0c7ee
  refs/heads/master 8c20822b4 -> cc158b2ac


Fixed tests


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

Branch: refs/heads/camel-2.15.x
Commit: c3fc7585e0dc962976b3350e1b6ed3fb8b71d75a
Parents: cfb6cd6
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Aug 6 10:17:44 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Aug 6 10:17:44 2015 +0200

----------------------------------------------------------------------
 ...roducerRouteAddRemoveRegisterAlwaysTest.java |  9 ++--
 .../management/ManagedRouteAddRemoveTest.java   | 44 ++++++++++----------
 2 files changed, 28 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c3fc7585/camel-core/src/test/java/org/apache/camel/management/ManagedProducerRouteAddRemoveRegisterAlwaysTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedProducerRouteAddRemoveRegisterAlwaysTest.java
b/camel-core/src/test/java/org/apache/camel/management/ManagedProducerRouteAddRemoveRegisterAlwaysTest.java
index 86ec502..46b64d0 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedProducerRouteAddRemoveRegisterAlwaysTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedProducerRouteAddRemoveRegisterAlwaysTest.java
@@ -29,6 +29,8 @@ import org.apache.camel.component.mock.MockEndpoint;
  */
 public class ManagedProducerRouteAddRemoveRegisterAlwaysTest extends ManagementTestSupport
{
 
+    private int size = 10;
+
     @Override
     protected CamelContext createCamelContext() throws Exception {
         CamelContext context = super.createCamelContext();
@@ -47,7 +49,7 @@ public class ManagedProducerRouteAddRemoveRegisterAlwaysTest extends ManagementT
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // number of producers
         ObjectName onP = ObjectName.getInstance("org.apache.camel:context=camel-1,type=producers,*");
@@ -72,7 +74,7 @@ public class ManagedProducerRouteAddRemoveRegisterAlwaysTest extends ManagementT
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // but as its recipient list which is dynamic-to we add new producers because we
have register always
         namesP = mbeanServer.queryNames(onP, null);
@@ -87,14 +89,13 @@ public class ManagedProducerRouteAddRemoveRegisterAlwaysTest extends ManagementT
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // and we still have the other producers, but not the one from the 2nd route that
was removed
         namesP = mbeanServer.queryNames(onP, null);
         assertEquals(4, namesP.size());
 
         log.info("Shutting down...");
-
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/c3fc7585/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
index 46656de..6878baf 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
@@ -32,6 +32,8 @@ import org.apache.camel.component.mock.MockEndpoint;
  * @version 
  */
 public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
+    
+    private int size = 10;
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
@@ -59,7 +61,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
         // number of services
         ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=services,*");
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // number of producers
         ObjectName onP = ObjectName.getInstance("org.apache.camel:context=camel-1,type=producers,*");
@@ -84,7 +86,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // but we should have one more producer
         namesP = mbeanServer.queryNames(onP, null);
@@ -99,7 +101,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // and the 2nd producer should be removed
         namesP = mbeanServer.queryNames(onP, null);
@@ -119,7 +121,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // number of producers
         ObjectName onP = ObjectName.getInstance("org.apache.camel:context=camel-1,type=producers,*");
@@ -144,7 +146,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // but as its recipient list which is dynamic-to we do not add a new producer
         namesP = mbeanServer.queryNames(onP, null);
@@ -159,7 +161,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // and we still have the original producer
         namesP = mbeanServer.queryNames(onP, null);
@@ -179,7 +181,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // number of producers
         ObjectName onP = ObjectName.getInstance("org.apache.camel:context=camel-1,type=producers,*");
@@ -204,7 +206,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // but as its recipient list which is dynamic-to we do not add a new producer
         namesP = mbeanServer.queryNames(onP, null);
@@ -219,7 +221,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // and we still have the original producer
         namesP = mbeanServer.queryNames(onP, null);
@@ -239,7 +241,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         log.info("Adding 2nd route");
 
@@ -269,7 +271,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // now stop and remove the 2nd route
         log.info("Stopping 2nd route");
@@ -281,7 +283,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         log.info("Shutting down...");
     }
@@ -297,7 +299,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         log.info("Adding 2nd route");
 
@@ -328,7 +330,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // now stop and remove the 2nd route
         log.info("Stopping 2nd route");
@@ -340,7 +342,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         log.info("Shutting down...");
     }
@@ -356,7 +358,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         log.info("Adding 2nd route");
 
@@ -385,7 +387,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // now stop and remove the 2nd route
         log.info("Stopping 2nd route");
@@ -397,7 +399,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         log.info("Shutting down...");
     }
@@ -413,7 +415,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         log.info("Adding 2nd route");
 
@@ -443,7 +445,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         // now stop and remove the 2nd route
         log.info("Stopping 2nd route");
@@ -455,7 +457,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
 
         // there should still be the same number of services
         names = mbeanServer.queryNames(on, null);
-        assertEquals(9, names.size());
+        assertEquals(size, names.size());
 
         log.info("Shutting down...");
     }


Mime
View raw message