You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ri...@apache.org on 2010/04/07 13:46:46 UTC

svn commit: r931508 - in /qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test: framework/MessagingTestConfigProperties.java framework/distributedtesting/TestClient.java utils/ConversationFactory.java

Author: ritchiem
Date: Wed Apr  7 11:46:46 2010
New Revision: 931508

URL: http://svn.apache.org/viewvc?rev=931508&view=rev
Log:
QPID-2484 : Commit from Andrew Kennedy to work around the inability to toString sent messages, the test now use getJMSMessageID() rather than toString(). 

Modified:
    qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/MessagingTestConfigProperties.java
    qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java
    qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/ConversationFactory.java

Modified: qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/MessagingTestConfigProperties.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/MessagingTestConfigProperties.java?rev=931508&r1=931507&r2=931508&view=diff
==============================================================================
--- qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/MessagingTestConfigProperties.java (original)
+++ qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/MessagingTestConfigProperties.java Wed Apr  7 11:46:46 2010
@@ -96,7 +96,7 @@ public class MessagingTestConfigProperti
     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";

Modified: qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java?rev=931508&r1=931507&r2=931508&view=diff
==============================================================================
--- qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java (original)
+++ qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java Wed Apr  7 11:46:46 2010
@@ -71,12 +71,6 @@ public class TestClient implements Messa
     /** 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 Messa
             + ", 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 Messa
                     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 Messa
                     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 Messa
                 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 Messa
                 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);
             }

Modified: qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/ConversationFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/ConversationFactory.java?rev=931508&r1=931507&r2=931508&view=diff
==============================================================================
--- qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/ConversationFactory.java (original)
+++ qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/ConversationFactory.java Wed Apr  7 11:46:46 2010
@@ -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;



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org