activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1153849 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
Date Thu, 04 Aug 2011 11:26:03 GMT
Author: gtully
Date: Thu Aug  4 11:26:03 2011
New Revision: 1153849

URL: http://svn.apache.org/viewvc?rev=1153849&view=rev
Log:
resolve intermittent failure with this test, fix up the sync

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

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java?rev=1153849&r1=1153848&r2=1153849&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
Thu Aug  4 11:26:03 2011
@@ -163,16 +163,15 @@ public class OnePrefetchAsyncConsumerTes
                      // let the session deliver the message
                      session.run();
 
-                     // commit the tx
-                     try {
-                         session.commit();
-                     }
-                     catch (JMSException e) {
-                     }
-
+                     // commit the tx and
                      // return ServerSession to pool
                      synchronized (pool) {
-                         pool.serverSessionInUse = false;
+                        try {
+                            session.commit();
+                        }
+                        catch (JMSException e) {
+                        }
+                        pool.serverSessionInUse = false;
                      }
 
                      // let the test check if the test was completed



Mime
View raw message