diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2010-04-12 15:44:19 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2010-04-12 15:44:19 +0000 |
| commit | fb7376620cd4a090f544dece75ec467ba5191fd5 (patch) | |
| tree | 4608132aa1e5cb8f276df79f4018768b634c0df1 | |
| parent | ca365371e483a9311c1caf50bc1d0ce3416e4519 (diff) | |
| download | qpid-python-fb7376620cd4a090f544dece75ec467ba5191fd5.tar.gz | |
QPID-2484 : Commit from Andrew Kennedy to work around the inability to toString sent messages, the test now use getJMSMessageID() rather than toString().
Merged from 0.5.x-dev rev 931508
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@933289 13f79535-47bb-0310-9956-ffa450edef68
3 files changed, 17 insertions, 15 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/MessagingTestConfigProperties.java b/java/systests/src/main/java/org/apache/qpid/test/framework/MessagingTestConfigProperties.java index 27f9261d94..6d72402018 100644 --- a/java/systests/src/main/java/org/apache/qpid/test/framework/MessagingTestConfigProperties.java +++ b/java/systests/src/main/java/org/apache/qpid/test/framework/MessagingTestConfigProperties.java @@ -96,7 +96,7 @@ public class MessagingTestConfigProperties extends ParsedProperties public static final String VIRTUAL_HOST_PROPNAME = "virtualHost"; /** Holds the default virtual path for the test. */ - public static final String VIRTUAL_HOST_DEFAULT = ""; + public static final String VIRTUAL_HOST_DEFAULT = "test"; /** Holds the name of the property to get the broker access username from. */ public static final String USERNAME_PROPNAME = "username"; diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java index 642c690376..33770363ce 100644 --- a/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java +++ b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java @@ -71,12 +71,6 @@ public class TestClient implements MessageListener /** Holds the default identifying name of the test client. */ public static final String CLIENT_NAME = "java"; - /** Holds the URL of the broker to run the tests on. */ - public static String brokerUrl; - - /** Holds the virtual host to run the tests on. If <tt>null</tt>, then the default virtual host is used. */ - public static String virtualHost; - /** * Holds the test context properties that provides the default test parameters, plus command line overrides. * This is initialized with the default test parameters, to which command line overrides may be applied. @@ -123,10 +117,18 @@ public class TestClient implements MessageListener + ", String clientName = " + clientName + ", boolean join = " + join + "): called"); // Retain the connection parameters. - brokerUrl = pBrokerUrl; - virtualHost = pVirtualHost; this.clientName = clientName; this.join = join; + + // Save properies from command line to defaults + if (pBrokerUrl != null) + { + testContextProperties.setProperty(MessagingTestConfigProperties.BROKER_PROPNAME, pBrokerUrl); + } + if (pVirtualHost != null) + { + testContextProperties.setProperty(MessagingTestConfigProperties.VIRTUAL_HOST_PROPNAME, pVirtualHost); + } } /** @@ -368,7 +370,7 @@ public class TestClient implements MessageListener enlistMessage.setStringProperty("CLIENT_PRIVATE_CONTROL_KEY", "iop.control." + clientName); enlistMessage.setJMSCorrelationID(message.getJMSCorrelationID()); - log.debug("Sending enlist message '" + enlistMessage + "' to " + message.getJMSReplyTo()); + log.debug("Sending enlist message '" + enlistMessage.getJMSMessageID() + "' to " + message.getJMSReplyTo()); producer.send(message.getJMSReplyTo(), enlistMessage); } @@ -381,7 +383,7 @@ public class TestClient implements MessageListener enlistMessage.setStringProperty("CLIENT_PRIVATE_CONTROL_KEY", "iop.control." + clientName); enlistMessage.setJMSCorrelationID(message.getJMSCorrelationID()); - log.debug("Sending decline message '" + enlistMessage + "' to " + message.getJMSReplyTo()); + log.debug("Sending decline message '" + enlistMessage.getJMSMessageID() + "' to " + message.getJMSReplyTo()); producer.send(message.getJMSReplyTo(), enlistMessage); } @@ -403,7 +405,7 @@ public class TestClient implements MessageListener acceptRoleMessage.setStringProperty("CONTROL_TYPE", "ACCEPT_ROLE"); acceptRoleMessage.setJMSCorrelationID(message.getJMSCorrelationID()); - log.debug("Sending accept role message '" + acceptRoleMessage + "' to " + message.getJMSReplyTo()); + log.debug("Sending accept role message '" + acceptRoleMessage.getJMSMessageID() + "' to " + message.getJMSReplyTo()); producer.send(message.getJMSReplyTo(), acceptRoleMessage); } @@ -440,7 +442,7 @@ public class TestClient implements MessageListener reportMessage.setStringProperty("CONTROL_TYPE", "REPORT"); reportMessage.setJMSCorrelationID(message.getJMSCorrelationID()); - log.debug("Sending report message '" + reportMessage + "' to " + message.getJMSReplyTo()); + log.debug("Sending report message '" + reportMessage.getJMSMessageID() + "' to " + message.getJMSReplyTo()); producer.send(message.getJMSReplyTo(), reportMessage); } diff --git a/java/systests/src/main/java/org/apache/qpid/test/utils/ConversationFactory.java b/java/systests/src/main/java/org/apache/qpid/test/utils/ConversationFactory.java index bc68320224..1e679af112 100644 --- a/java/systests/src/main/java/org/apache/qpid/test/utils/ConversationFactory.java +++ b/java/systests/src/main/java/org/apache/qpid/test/utils/ConversationFactory.java @@ -260,8 +260,8 @@ public class ConversationFactory */ public void send(Destination sendDestination, Message message) throws JMSException { - log.debug("public void send(Destination sendDestination = " + sendDestination + ", Message message = " + message - + "): called"); + log.debug("public void send(Destination sendDestination = " + sendDestination + ", Message message = " + + message.getJMSMessageID() + "): called"); // Conversation settings = threadLocals.get(); // long conversationId = conversationId; |
