Swap expected and actual so that they match the intent of the assertion, otherwise the error message is misleading.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1478395 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2013-05-02 14:53:52 +00:00
parent d687324465
commit b9cc24bdb6
1 changed files with 3 additions and 3 deletions

View File

@ -89,8 +89,8 @@ public class FailoverClusterTestSupport extends TestCase {
}
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 extends TestCase {
protected void assertAllConnectedTo(String url) throws Exception {
for (ActiveMQConnection c : connections) {
assertEquals(c.getTransportChannel().getRemoteAddress(), url);
assertEquals(url, c.getTransportChannel().getRemoteAddress());
}
}