diff options
| author | Robert Godfrey <rgodfrey@apache.org = rgodfrey = Robert Godfrey rgodfrey@apache.org@apache.org> | 2014-04-13 09:22:31 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org = rgodfrey = Robert Godfrey rgodfrey@apache.org@apache.org> | 2014-04-13 09:22:31 +0000 |
| commit | 529183e95ce802787694ec7b5b72a50f2c895821 (patch) | |
| tree | 5b4dfba1800e406e165b5ad94c4a3b2b8f26216f /qpid/java/systests/src | |
| parent | 715d89a019ac686c9227815eabe5c5bc2d15201f (diff) | |
| download | qpid-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/systests/src')
| -rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/server/BrokerStartupTest.java | 10 |
1 files changed, 7 insertions, 3 deletions
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(); } |
