summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org = rgodfrey = Robert Godfrey rgodfrey@apache.org@apache.org>2014-04-13 09:22:31 +0000
committerRobert Godfrey <rgodfrey@apache.org = rgodfrey = Robert Godfrey rgodfrey@apache.org@apache.org>2014-04-13 09:22:31 +0000
commit529183e95ce802787694ec7b5b72a50f2c895821 (patch)
tree5b4dfba1800e406e165b5ad94c4a3b2b8f26216f /qpid/java
parent715d89a019ac686c9227815eabe5c5bc2d15201f (diff)
downloadqpid-python-529183e95ce802787694ec7b5b72a50f2c895821.tar.gz
QPID-5687 : [Java Broker] change to explicitly use the port in a connection url, and avoid the issue of differing vhosts in the test config and initial config (revert last commit 1586942 and modify correct file instead)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1586944 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/BrokerStartupTest.java10
2 files changed, 8 insertions, 4 deletions
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
index 429676c638..5700f20356 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
@@ -32,7 +32,7 @@ import org.apache.qpid.server.security.SubjectCreator;
import org.apache.qpid.server.stats.StatisticsGatherer;
import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
-@ManagedObject( defaultType = "Broker" )
+@ManagedObject( defaultType = "adapter" )
public interface Broker<X extends Broker<X>> extends ConfiguredObject<X>, EventLoggerProvider, StatisticsGatherer
{
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/BrokerStartupTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/BrokerStartupTest.java
index e3d0901942..ff967e6e0e 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/BrokerStartupTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/BrokerStartupTest.java
@@ -31,6 +31,7 @@ import junit.framework.AssertionFailedError;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
+import org.apache.qpid.client.AMQConnectionURL;
import org.apache.qpid.server.logging.AbstractTestLogging;
import org.apache.qpid.util.LogMonitor;
@@ -52,8 +53,6 @@ public class BrokerStartupTest extends AbstractTestLogging
* This test simply tests that the broker will startup even if there is no config file (i.e. that it can use the
* currently packaged initial config file (all system tests by default generate their own config file).
*
- * It makes the assumption that setting the system property qpid.amqp_port
- * to the value of getPort(0) will allow a connection to be established with getConnection()
*
* @throws Exception
*/
@@ -70,7 +69,12 @@ public class BrokerStartupTest extends AbstractTestLogging
setTestSystemProperty("qpid.rmi_port",String.valueOf(connectorServerPort));
startBroker(port, null);
- Connection conn = getConnection();
+ AMQConnectionURL url = new AMQConnectionURL(String.format("amqp://"
+ + GUEST_USERNAME
+ + ":"
+ + GUEST_PASSWORD
+ + "@clientid/?brokerlist='localhost:%d'", port));
+ Connection conn = getConnection(url);
assertNotNull(conn);
conn.close();
}