[jboss-remoting-commits] JBoss Remoting SVN: r4114 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/registry.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Thu May 1 21:41:25 EDT 2008
Author: ron.sigal at jboss.com
Date: 2008-05-01 21:41:25 -0400 (Thu, 01 May 2008)
New Revision: 4114
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/registry/NetworkRegistryTestCase.java
Log:
JBREM-930: Doesn't change counters if notification is from extraneous servers.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/registry/NetworkRegistryTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/registry/NetworkRegistryTestCase.java 2008-05-01 22:21:57 UTC (rev 4113)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/registry/NetworkRegistryTestCase.java 2008-05-02 01:41:25 UTC (rev 4114)
@@ -181,28 +181,36 @@
log.info("Received notification: " + notification);
if (notification instanceof NetworkNotification)
{
+ int tempAdded = 0;
NetworkNotification netNot = (NetworkNotification) notification;
if(NetworkNotification.SERVER_ADDED.equals(netNot.getType()))
{
- numOfAdded = 0;
InvokerLocator[] locators = netNot.getLocator();
for (int i = 0; i < locators.length; i++)
{
if (locators[i].isSameEndpoint(locator1) || locators[i].isSameEndpoint(locator2))
- numOfAdded++;
+ tempAdded++;
}
- log.info("server added. num of locators added = " + numOfAdded);
+ if (tempAdded > 0)
+ {
+ numOfAdded = tempAdded;
+ log.info("server added. num of locators added = " + numOfAdded);
+ }
}
else if(NetworkNotification.SERVER_UPDATED.equals(netNot.getType()))
{
- numOfUpdated = 0;
+ int tempUpdated = 0;
InvokerLocator[] locators = netNot.getLocator();
for (int i = 0; i < locators.length; i++)
{
if (locators[i].isSameEndpoint(locator1) || locators[i].isSameEndpoint(locator2))
- numOfUpdated++;
+ tempUpdated++;
}
- log.info("server updated. num of locators in update = " + numOfUpdated);
+ if (tempUpdated > 0)
+ {
+ numOfUpdated = tempUpdated;
+ log.info("server updated. num of locators in update = " + numOfUpdated);
+ }
}
ServerInvokerMetadata[] serverMetadata = netNot.getServerInvokers();
log.info(netNot.getIdentity());
More information about the jboss-remoting-commits
mailing list