diff options
| author | Keith Wall <kwall@apache.org> | 2011-09-14 13:35:17 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2011-09-14 13:35:17 +0000 |
| commit | f7fb81d90c7f10ea187416883b2699dd6cb25f83 (patch) | |
| tree | ca8c859bbd16ba3f3aad2289623f944f30f8e175 /qpid/java/systests/src | |
| parent | 5b4907d81effd26d15dd418ff2a3df8bb3dab9e3 (diff) | |
| download | qpid-python-f7fb81d90c7f10ea187416883b2699dd6cb25f83.tar.gz | |
QPID-3486: Make connector server port used for JMX configurable.
Commited work from Andrew MacBean <andymacbean@gmail.com> any myself.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1170612 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/systests/src')
| -rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java | 5 | ||||
| -rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java index 9feca7279e..24e6aa4207 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java @@ -22,6 +22,7 @@ package org.apache.qpid.server.logging; import junit.framework.AssertionFailedError; +import org.apache.qpid.server.configuration.ServerConfiguration; import org.apache.qpid.util.LogMonitor; import java.util.List; @@ -206,7 +207,7 @@ public class ManagementLoggingTest extends AbstractTestLogging validateMessageID("MNG-1002", log); //Check the RMI Registry port is as expected - int mPort = getPort() + (DEFAULT_MANAGEMENT_PORT - DEFAULT_PORT); + int mPort = getManagementPort(getPort()); assertTrue("RMI Registry port not as expected(" + mPort + ").:" + getMessageString(log), getMessageString(log).endsWith(String.valueOf(mPort))); @@ -217,7 +218,7 @@ public class ManagementLoggingTest extends AbstractTestLogging // We expect the RMI Registry port (the defined 'management port') to be // 100 lower than the JMX RMIConnector Server Port (the actual JMX server) - int jmxPort = mPort + 100; + int jmxPort = mPort + ServerConfiguration.JMXPORT_CONNECTORSERVER_OFFSET; assertTrue("JMX RMIConnectorServer port not as expected(" + jmxPort + ").:" + getMessageString(log), getMessageString(log).endsWith(String.valueOf(jmxPort))); } diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java index 0a98fc3382..40df024c67 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java @@ -137,7 +137,7 @@ public class QpidBrokerTestCase extends QpidTestCase public static final int DEFAULT_VM_PORT = 1; public static final int DEFAULT_PORT = Integer.getInteger("test.port", ServerConfiguration.DEFAULT_PORT); public static final int FAILING_PORT = Integer.parseInt(System.getProperty("test.port.alt")); - public static final int DEFAULT_MANAGEMENT_PORT = Integer.getInteger("test.mport", ServerConfiguration.DEFAULT_JMXPORT); + public static final int DEFAULT_MANAGEMENT_PORT = Integer.getInteger("test.mport", ServerConfiguration.DEFAULT_JMXPORT_REGISTRYSERVER); public static final int DEFAULT_SSL_PORT = Integer.getInteger("test.port.ssl", ServerConfiguration.DEFAULT_SSL_PORT); protected String _brokerLanguage = System.getProperty(BROKER_LANGUAGE, JAVA); @@ -480,7 +480,7 @@ public class QpidBrokerTestCase extends QpidTestCase addExcludedPorts(port, DEFAULT_SSL_PORT, options); - options.setJmxPort(getManagementPort(port)); + options.setJmxPortRegistryServer(getManagementPort(port)); //Set the log config file, relying on the log4j.configuration system property //set on the JVM by the JUnit runner task in module.xml. |
