summaryrefslogtreecommitdiff
path: root/qpid
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2009-08-12 18:13:32 +0000
committerMartin Ritchie <ritchiem@apache.org>2009-08-12 18:13:32 +0000
commit417cf6738b35932b28aea984389988d87eae0477 (patch)
treec9d7266db1a9ca66816e8d7c702665bef7e43cbb /qpid
parentd387113d0742931ba98fd71ade0ed1b4bd7719c4 (diff)
downloadqpid-python-417cf6738b35932b28aea984389988d87eae0477.tar.gz
Augmented QpidTestCase to proved details of the currently active management port
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@803646 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
index cd8071527c..02c8ed2c10 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
@@ -362,6 +362,16 @@ public class QpidTestCase extends TestCase
}
/**
+ * Return the management portin use by the broker on this main port
+ * @param mainPort the broker's main port.
+ * @return the management port that corresponds to the broker on the given port
+ */
+ protected int getManagementPort(int mainPort)
+ {
+ return mainPort + (DEFAULT_MANAGEMENT_PORT - DEFAULT_PORT);
+ }
+
+ /**
* Get the Port that is use by the current broker
*
* @return the current port
@@ -392,7 +402,7 @@ public class QpidTestCase extends TestCase
return _broker
.replace("@PORT", "" + port)
.replace("@SSL_PORT", "" + (port - 1))
- .replace("@MPORT", "" + (port + (DEFAULT_MANAGEMENT_PORT - DEFAULT_PORT)))
+ .replace("@MPORT", "" + getManagementPort(port))
.replace("@CONFIG_FILE", _configFile.toString());
}