summaryrefslogtreecommitdiff
path: root/java
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
commit8324d468605fbc348591811898c0ff855c20990d (patch)
tree3670671dc4ef65efc5f56243d00dfc65a66e604d /java
parent272c47b46a227476b2566b312795aace295dcfbc (diff)
downloadqpid-python-8324d468605fbc348591811898c0ff855c20990d.tar.gz
Augmented QpidTestCase to proved details of the currently active management port
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@803646 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java b/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
index cd8071527c..02c8ed2c10 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
+++ b/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());
}