activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmacn...@apache.org
Subject svn commit: r887445 - /activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/test/java/org/apache/activemq/actor/ActorTest.java
Date Fri, 04 Dec 2009 23:23:34 GMT
Author: cmacnaug
Date: Fri Dec  4 23:23:34 2009
New Revision: 887445

URL: http://svn.apache.org/viewvc?rev=887445&view=rev
Log:
Fixing unittest problem

Modified:
    activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/test/java/org/apache/activemq/actor/ActorTest.java

Modified: activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/test/java/org/apache/activemq/actor/ActorTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/test/java/org/apache/activemq/actor/ActorTest.java?rev=887445&r1=887444&r2=887445&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/test/java/org/apache/activemq/actor/ActorTest.java
(original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/test/java/org/apache/activemq/actor/ActorTest.java
Fri Dec  4 23:23:34 2009
@@ -7,6 +7,8 @@
  **************************************************************************************/
 package org.apache.activemq.actor;
 
+import static java.lang.String.format;
+
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
@@ -14,6 +16,7 @@
 
 import org.apache.activemq.dispatch.DispatchQueue;
 import org.apache.activemq.dispatch.DispatchSPI;
+import org.apache.activemq.dispatch.DispatchSystem;
 import org.apache.activemq.dispatch.internal.advanced.AdvancedDispatchSPI;
 
 
@@ -54,14 +57,13 @@
         CountDownLatch latch = new CountDownLatch(1);
         testObject.actorInvocation(latch);
         assertTrue(latch.await(1, TimeUnit.SECONDS));
-        
-        latch = new CountDownLatch(1);
+         
         queue.suspend();
-        assertFalse(latch.await(2, TimeUnit.SECONDS));
+        latch = new CountDownLatch(1);
+        testObject.actorInvocation(latch);
+        assertFalse("Suspended Queue shouldn't invoked method", latch.await(2, TimeUnit.SECONDS));
         
         queue.resume();
-        assertTrue(latch.await(2, TimeUnit.SECONDS));
-        
+        assertTrue("Resumed Queue should invoke method", latch.await(2, TimeUnit.SECONDS));
     }
-    
 }



Mime
View raw message