activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r825088 - in /activemq/branches/activemq-5.3: ./ activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSubscription.java activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java
Date Wed, 14 Oct 2009 11:30:19 GMT
Author: gtully
Date: Wed Oct 14 11:30:18 2009
New Revision: 825088

URL: http://svn.apache.org/viewvc?rev=825088&view=rev
Log:
merge from trunk fix race condition in test that validates dequeue count, thanks Al on irc

Modified:
    activemq/branches/activemq-5.3/   (props changed)
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSubscription.java
  (props changed)
    activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java

Propchange: activemq/branches/activemq-5.3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 11:30:18 2009
@@ -1 +1 @@
-/activemq/trunk:816278-816279,816298,818138,818140-818147,818155,818160-818176,818209,818211,818224-818262,818480,818484,818487,818496,818502,818504-818510,818513-818516,818609,818635,818724-818762,818888,818905,818914,818923,818947-818955,818985,820031,820713-820714,820764,821090,821103,821115,824807
+/activemq/trunk:816278-816279,816298,818138,818140-818147,818155,818160-818176,818209,818211,818224-818262,818480,818484,818487,818496,818502,818504-818510,818513-818516,818609,818635,818724-818762,818888,818905,818914,818923,818947-818955,818985,820031,820713-820714,820764,821090,821103,821115,824807,825084

Propchange: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSubscription.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 11:30:18 2009
@@ -1 +1 @@
-/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSubscription.java:502054-818935,818937-819035,820031,820713-820714,820764,821090,821103,821115
+/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSubscription.java:502054-818935,818937-819035,820031,820713-820714,820764,821090,821103,821115,825084

Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java?rev=825088&r1=825087&r2=825088&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java
Wed Oct 14 11:30:18 2009
@@ -27,6 +27,7 @@
 
 import org.apache.activemq.JmsMultipleBrokersTestSupport;
 import org.apache.activemq.broker.jmx.BrokerView;
+import org.apache.activemq.util.Wait;
 
 public class AMQ2439Test extends JmsMultipleBrokersTestSupport {
     Destination dest;
@@ -39,9 +40,14 @@
     }
     
     private void validateQueueStats() throws Exception {
-       BrokerView brokerView = brokers.get("BrokerA").broker.getAdminView();
+       final BrokerView brokerView = brokers.get("BrokerA").broker.getAdminView();
        assertEquals("enequeue is correct", 1000, brokerView.getTotalEnqueueCount());
-       assertEquals("dequeue is correct", 1000, brokerView.getTotalDequeueCount());
+       
+       assertTrue("dequeue is correct", Wait.waitFor(new Wait.Condition() {
+           public boolean isSatisified() throws Exception {
+               return 1000 == brokerView.getTotalDequeueCount();
+           }
+       }));
     }
 
     protected int receiveExactMessages(String brokerName, int msgCount) throws Exception
{



Mime
View raw message