From 529183e95ce802787694ec7b5b72a50f2c895821 Mon Sep 17 00:00:00 2001 From: Robert Godfrey Date: Sun, 13 Apr 2014 09:22:31 +0000 Subject: 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 --- .../src/main/java/org/apache/qpid/server/model/Broker.java | 2 +- .../main/java/org/apache/qpid/server/BrokerStartupTest.java | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'qpid/java') 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> extends ConfiguredObject, 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(); } -- cgit v1.2.1