activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1179612 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
Date Thu, 06 Oct 2011 13:09:49 GMT
Author: gtully
Date: Thu Oct  6 13:09:49 2011
New Revision: 1179612

URL: http://svn.apache.org/viewvc?rev=1179612&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3523 - fix issue with related test, org.apache.activemq.transport.discovery.DiscoveryNetworkReconnectTest

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java?rev=1179612&r1=1179611&r2=1179612&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
Thu Oct  6 13:09:49 2011
@@ -26,6 +26,7 @@ import javax.management.ObjectInstance;
 import javax.management.ObjectName;
 
 import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.jmx.AnnotatedMBean;
 import org.apache.activemq.broker.jmx.ManagementContext;
 import org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgentFactory;
 import org.apache.activemq.util.SocketProxy;
@@ -51,7 +52,7 @@ import org.junit.runner.RunWith;
 public class DiscoveryNetworkReconnectTest {
 
     private static final Logger LOG = LoggerFactory.getLogger(DiscoveryNetworkReconnectTest.class);
-    final int maxReconnects = 5;
+    final int maxReconnects = 2;
     final String groupName = "GroupID-" + "DiscoveryNetworkReconnectTest";
     final String discoveryAddress = "multicast://default?group=" + groupName + "&initialReconnectDelay=1000";
     final Semaphore mbeanRegistered = new Semaphore(0);
@@ -72,6 +73,7 @@ public class DiscoveryNetworkReconnectTe
         public boolean matches(Object arg0) {
             ObjectName other = (ObjectName) arg0;
             ObjectName mine = (ObjectName) name;
+            LOG.info("Match: " + mine + " vs: " + other);
             return other.getKeyProperty("Type").equals(mine.getKeyProperty("Type")) &&
                 other.getKeyProperty("NetworkConnectorName").equals(mine.getKeyProperty("NetworkConnectorName"));
         }
@@ -121,7 +123,7 @@ public class DiscoveryNetworkReconnectTe
                                 public Object invoke(Invocation invocation) throws Throwable
{
                                     LOG.info("Mbean Registered: " + invocation.getParameter(0));
                                     mbeanRegistered.release();
-                                    return new ObjectInstance((ObjectName)invocation.getParameter(0),
"dscription");
+                                    return new ObjectInstance((ObjectName)invocation.getParameter(1),
"dscription");
                                 }
                             });
             atLeast(maxReconnects - 1).of (managementContext).unregisterMBean(with(new NetworkBridgeObjectNameMatcher<ObjectName>(



Mime
View raw message