Author: tabish
Date: Thu May 2 14:53:52 2013
New Revision: 1478395
URL: http://svn.apache.org/r1478395
Log:
Swap expected and actual so that they match the intent of the assertion, otherwise the error
message is misleading.
Modified:
activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTestSupport.java
Modified: activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTestSupport.java?rev=1478395&r1=1478394&r2=1478395&view=diff
==============================================================================
--- activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTestSupport.java
(original)
+++ activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTestSupport.java
Thu May 2 14:53:52 2013
@@ -89,8 +89,8 @@ public class FailoverClusterTestSupport
}
Set<String> keys = clientConnectionCounts.keySet();
for(String key: keys){
- double count = (double)clientConnectionCounts.get(key);
- double percentage = count / (double)total;
+ double count = clientConnectionCounts.get(key);
+ double percentage = count / total;
logger.info(count + " of " + total + " connections for " + key + " = " + percentage);
assertTrue("Connections distribution expected to be >= than " + minimumPercentage
+ ". Actuall distribution was " + percentage + " for connection " +
key,
@@ -100,7 +100,7 @@ public class FailoverClusterTestSupport
protected void assertAllConnectedTo(String url) throws Exception {
for (ActiveMQConnection c : connections) {
- assertEquals(c.getTransportChannel().getRemoteAddress(), url);
+ assertEquals(url, c.getTransportChannel().getRemoteAddress());
}
}
|