qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject qpid-jms git commit: NO-JIRA minor updates for testing the current codebase
Date Fri, 28 Oct 2016 23:09:14 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master 593b3e7f5 -> 34209975f


NO-JIRA minor updates for testing the current codebase

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/34209975
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/34209975
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/34209975

Branch: refs/heads/master
Commit: 34209975f82511fbe34e208808ff65bb0f656965
Parents: 593b3e7
Author: Timothy Bish <tabish121@gmail.com>
Authored: Fri Oct 28 19:08:45 2016 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Fri Oct 28 19:08:45 2016 -0400

----------------------------------------------------------------------
 .../qpid/jms/bench/ProducerAndConsumerBench.java | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/34209975/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/bench/ProducerAndConsumerBench.java
----------------------------------------------------------------------
diff --git a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/bench/ProducerAndConsumerBench.java
b/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/bench/ProducerAndConsumerBench.java
index a757e43..6a607f2 100644
--- a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/bench/ProducerAndConsumerBench.java
+++ b/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/bench/ProducerAndConsumerBench.java
@@ -28,7 +28,6 @@ import java.util.concurrent.atomic.AtomicLong;
 import javax.jms.BytesMessage;
 import javax.jms.ConnectionFactory;
 import javax.jms.DeliveryMode;
-import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Queue;
@@ -64,7 +63,7 @@ public class ProducerAndConsumerBench extends AmqpTestSupport  {
     private final Vector<Throwable> exceptions = new Vector<Throwable>();
     private ConnectionFactory factory;
 
-    private final long NUM_SENDS = 30000;
+    private final long NUM_SENDS = 100000;
 
     @Test
     public void testProduceConsume() throws Exception {
@@ -121,6 +120,9 @@ public class ProducerAndConsumerBench extends AmqpTestSupport  {
         MessageConsumer consumer = session.createConsumer(queue);
         long v;
         while ((v = count.decrementAndGet()) > 0) {
+            if ((count.get() % 10000) == 0) {
+                LOG.info("Received message: {}", NUM_SENDS - count.get());
+            }
             assertNotNull("got message " + v, consumer.receive(15000));
         }
         consumer.close();
@@ -134,11 +136,14 @@ public class ProducerAndConsumerBench extends AmqpTestSupport  {
 
         MessageProducer producer = session.createProducer(queue);
         producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        Message message = session.createBytesMessage();
-        ((BytesMessage) message).writeBytes(payloadString.getBytes());
 
         while (count.getAndDecrement() > 0) {
+            BytesMessage message = session.createBytesMessage();
+            message.writeBytes(payloadString.getBytes());
             producer.send(message);
+            if ((count.get() % 10000) == 0) {
+                LOG.info("Sent message: {}", NUM_SENDS - count.get());
+            }
         }
         producer.close();
         connection.close();
@@ -162,7 +167,7 @@ public class ProducerAndConsumerBench extends AmqpTestSupport  {
 
     @Override
     protected boolean isForceAsyncSends() {
-        return true;
+        return false;
     }
 
     @Override
@@ -172,7 +177,7 @@ public class ProducerAndConsumerBench extends AmqpTestSupport  {
 
     @Override
     protected String getAmqpTransformer() {
-        return "raw";
+        return "jms";
     }
 
     @Override
@@ -182,7 +187,7 @@ public class ProducerAndConsumerBench extends AmqpTestSupport  {
 
     @Override
     public String getAmqpConnectionURIOptions() {
-        return "jms.presettlePolicy.presettleAll=true";
+        return "jms.presettlePolicy.presettleAll=false";
     }
 
     @Override


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message