You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ru...@apache.org on 2007/05/17 15:55:50 UTC

svn commit: r538924 - in /incubator/qpid/trunk/qpid: ./ java/perftests/src/test/java/org/apache/qpid/ping/PingLatencyTestPerf.java

Author: rupertlssmith
Date: Thu May 17 06:55:49 2007
New Revision: 538924

URL: http://svn.apache.org/viewvc?view=rev&rev=538924
Log:
Merged revisions 538922 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/qpid/branches/M2

........
  r538922 | rupertlssmith | 2007-05-17 14:53:44 +0100 (Thu, 17 May 2007) | 1 line
  
  Small fix to correct property name.
........

Modified:
    incubator/qpid/trunk/qpid/   (props changed)
    incubator/qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/ping/PingLatencyTestPerf.java

Propchange: incubator/qpid/trunk/qpid/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/ping/PingLatencyTestPerf.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/ping/PingLatencyTestPerf.java?view=diff&rev=538924&r1=538923&r2=538924
==============================================================================
--- incubator/qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/ping/PingLatencyTestPerf.java (original)
+++ incubator/qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/ping/PingLatencyTestPerf.java Thu May 17 06:55:49 2007
@@ -34,10 +34,10 @@
 
 import org.apache.log4j.Logger;
 
-import org.apache.qpid.requestreply.PingPongProducer;
 import org.apache.qpid.client.AMQSession;
 import org.apache.qpid.client.message.AMQMessage;
 import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.requestreply.PingPongProducer;
 
 import uk.co.thebadgerset.junit.extensions.TimingController;
 import uk.co.thebadgerset.junit.extensions.TimingControllerAware;
@@ -67,7 +67,7 @@
     private static Logger _logger = Logger.getLogger(PingLatencyTestPerf.class);
 
     /** Holds the name of the property to get the test results logging batch size. */
-    public static final String TEST_RESULTS_BATCH_SIZE_PROPNAME = "BatchSize";
+    public static final String TEST_RESULTS_BATCH_SIZE_PROPNAME = "batchSize";
 
     /** Holds the default test results logging batch size. */
     public static final int DEFAULT_TEST_RESULTS_BATCH_SIZE = 1000;
@@ -83,7 +83,7 @@
      * controler.
      */
     private Map<String, PerCorrelationId> perCorrelationIds =
-            Collections.synchronizedMap(new HashMap<String, PerCorrelationId>());
+        Collections.synchronizedMap(new HashMap<String, PerCorrelationId>());
 
     /** Holds the batched results listener, that does logging on batch boundaries. */
     private BatchedResultsListener batchedResultsListener = null;
@@ -99,7 +99,7 @@
 
         // Sets up the test parameters with defaults.
         ParsedProperties.setSysPropertyIfNull(TEST_RESULTS_BATCH_SIZE_PROPNAME,
-                                              Integer.toString(DEFAULT_TEST_RESULTS_BATCH_SIZE));
+            Integer.toString(DEFAULT_TEST_RESULTS_BATCH_SIZE));
     }
 
     /** Compile all the tests into a test suite. */
@@ -171,9 +171,9 @@
 
         // Generate a sample message of the specified size.
         Message msg =
-                pingClient.getTestMessage(perThreadSetup._pingClient.getReplyDestinations().get(0),
-                                          testParameters.getPropertyAsInteger(PingPongProducer.MESSAGE_SIZE_PROPNAME),
-                                          testParameters.getPropertyAsBoolean(PingPongProducer.PERSISTENT_MODE_PROPNAME));
+            pingClient.getTestMessage(perThreadSetup._pingClient.getReplyDestinations().get(0),
+                testParameters.getPropertyAsInteger(PingPongProducer.MESSAGE_SIZE_PROPNAME),
+                testParameters.getPropertyAsBoolean(PingPongProducer.PERSISTENT_MODE_PROPNAME));
 
         // Send the requested number of messages, and wait until they have all been received.
         long timeout = Long.parseLong(testParameters.getProperty(PingPongProducer.TIMEOUT_PROPNAME));
@@ -246,7 +246,9 @@
         public BatchedResultsListener(int batchSize)
         {
             _batchSize = batchSize;
-            _strictAMQP = Boolean.parseBoolean(System.getProperties().getProperty(AMQSession.STRICT_AMQP, AMQSession.STRICT_AMQP_DEFAULT));
+            _strictAMQP =
+                Boolean.parseBoolean(System.getProperties().getProperty(AMQSession.STRICT_AMQP,
+                        AMQSession.STRICT_AMQP_DEFAULT));
         }
 
         /**
@@ -284,9 +286,11 @@
 
                     if (_strictAMQP)
                     {
-                        Long value = ((AMQMessage) message).getTimestampProperty(new AMQShortString(PingPongProducer.MESSAGE_TIMESTAMP_PROPNAME));
+                        Long value =
+                            ((AMQMessage) message).getTimestampProperty(new AMQShortString(
+                                    PingPongProducer.MESSAGE_TIMESTAMP_PROPNAME));
 
-                        startTime = (value == null ? 0L : value);
+                        startTime = ((value == null) ? 0L : value);
                     }
                     else
                     {