activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r818609 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java
Date Thu, 24 Sep 2009 20:00:51 GMT
Author: chirino
Date: Thu Sep 24 20:00:47 2009
New Revision: 818609

URL: http://svn.apache.org/viewvc?rev=818609&view=rev
Log:
Fixing JMSConsumerTest failure: Test case made an invalid assumption.


Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java?rev=818609&r1=818608&r2=818609&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java Thu
Sep 24 20:00:47 2009
@@ -363,7 +363,7 @@
 
     public void initCombosForTestMessageListenerOnMessageCloseUnackedWithPrefetch1StayInQueue()
{ 
         addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("ackMode", new Object[] {Integer.valueOf(Session.DUPS_OK_ACKNOWLEDGE)});
+        addCombinationValues("ackMode", new Object[] {Integer.valueOf(Session.CLIENT_ACKNOWLEDGE)});
         addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE)});
     }
 
@@ -398,6 +398,7 @@
                         connection.close();
                         got2Done.countDown();
                     }
+                    tm.acknowledge();
                 } catch (Throwable e) {
                     e.printStackTrace();
                 }
@@ -442,7 +443,7 @@
         assertTrue(done2.await(1000, TimeUnit.MILLISECONDS));
         Thread.sleep(200);
 
-        // assert msg 2 was redelivered as close() from onMessages() will only ack in auto_ack
mode
+        // assert msg 2 was redelivered as close() from onMessages() will only ack in auto_ack
and dups_ok mode
         assertEquals(5, counter.get());      
     }
 



Mime
View raw message