activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1367727 - in /activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo: JMSUsecaseTest.java JmsTestBase.java
Date Tue, 31 Jul 2012 19:47:52 GMT
Author: chirino
Date: Tue Jul 31 19:47:51 2012
New Revision: 1367727

URL: http://svn.apache.org/viewvc?rev=1367727&view=rev
Log:
Fixes APLO-231: Intended delivery mode for JMSUsecaseTest is not tested

Applied Christian Posta's patch.  Thanks!

Modified:
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JMSUsecaseTest.java
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JmsTestBase.java

Modified: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JMSUsecaseTest.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JMSUsecaseTest.java?rev=1367727&r1=1367726&r2=1367727&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JMSUsecaseTest.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JMSUsecaseTest.java
Tue Jul 31 19:47:51 2012
@@ -48,7 +48,10 @@ public class JMSUsecaseTest extends JmsT
         connection.start();
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         destination = createDestination(session, destinationType);
-        sendMessages(session, destination, 5);
+        MessageProducer producer = session.createProducer(destination);
+        producer.setDeliveryMode(this.deliveryMode);
+        sendMessages(session, producer, 5);
+        producer.close();
 
         QueueBrowser browser = session.createBrowser((Queue)destination);
         Enumeration enumeration = browser.getEnumeration();
@@ -74,6 +77,7 @@ public class JMSUsecaseTest extends JmsT
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         destination = createDestination(session, destinationType);
         MessageProducer producer = session.createProducer(destination);
+        producer.setDeliveryMode(this.deliveryMode);
         MessageConsumer consumer = session.createConsumer(destination);
         producer.send(session.createMessage());
 
@@ -94,6 +98,7 @@ public class JMSUsecaseTest extends JmsT
         Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
         destination = createDestination(session, destinationType);
         MessageProducer producer = session.createProducer(destination);
+        producer.setDeliveryMode(this.deliveryMode);
         MessageConsumer consumer = session.createConsumer(destination);
         producer.send(session.createTextMessage("test"));
 

Modified: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JmsTestBase.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JmsTestBase.java?rev=1367727&r1=1367726&r2=1367727&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JmsTestBase.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JmsTestBase.java
Tue Jul 31 19:47:51 2012
@@ -228,10 +228,14 @@ public class JmsTestBase extends Combina
 
     protected void sendMessages(Session session, Destination destination, int count) throws
JMSException {
         MessageProducer producer = session.createProducer(destination);
+        sendMessages(session, producer, count);
+        producer.close();
+    }
+
+    protected void sendMessages(Session session, MessageProducer producer, int count) throws
JMSException {
         for (int i = 0; i < count; i++) {
             producer.send(session.createTextMessage(messageTextPrefix  + i));
         }
-        producer.close();
     }
 
 



Mime
View raw message