Author: ritchiem
Date: Wed Aug 12 18:13:32 2009
New Revision: 803646

URL: http://svn.apache.org/viewvc?rev=803646&view=rev
Log:
Augmented QpidTestCase to proved details of the currently active management port

Modified:
    
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java

Modified: 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java?rev=803646&r1=803645&r2=803646&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
 (original)
+++ 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
 Wed Aug 12 18:13:32 2009
@@ -362,6 +362,16 @@
     }
 
     /**
+     * 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 @@
         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());
     }
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to