activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r711284 - in /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory: MasterSlaveTempQueueMemoryTest.java TempQueueMemoryTest.java
Date Tue, 04 Nov 2008 16:05:01 GMT
Author: gtully
Date: Tue Nov  4 08:05:01 2008
New Revision: 711284

URL: http://svn.apache.org/viewvc?rev=711284&view=rev
Log:
ensure master is always started before first connect attempt, ignore expected exception on
shutdown

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java?rev=711284&r1=711283&r2=711284&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java
Tue Nov  4 08:05:01 2008
@@ -61,7 +61,7 @@
         
         // because master will wait for slave to connect it needs 
         // to be in a separate thread
-        new Thread() { 
+        Thread starterThread = new Thread() { 
             public void run() {
                 try {
                     broker.setWaitForSlave(true);
@@ -71,9 +71,11 @@
                     e.printStackTrace();
                 }
             }
-        }.start();
+        };
+        starterThread.start();
         
         slave.start();
+        starterThread.join(60*1000);
         assertTrue("slave is indeed a slave", slave.isSlave());
     }
 
@@ -92,10 +94,10 @@
         AdvisoryBroker ab = (AdvisoryBroker) slave.getBroker().getAdaptor(
                 AdvisoryBroker.class);
         
-        if (!deleteTempQueue) {
+        if (!deleteTempQueue || serverTransactional) {
             // give temp destination removes a chance to perculate on connection.close
             Thread.sleep(2000);
-        }
+        } 
         assertEquals("the temp queues should not be visible as they are removed", 1, ab.getAdvisoryDestinations().size());
                        
         RegionBroker rb = (RegionBroker) slave.getBroker().getAdaptor(

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java?rev=711284&r1=711283&r2=711284&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
Tue Nov  4 08:05:01 2008
@@ -98,6 +98,7 @@
                             // temp queue will be cleaned up on clientConnection.close
                         }
                     }
+                } catch (IllegalStateException IgnoredAsCanOcurrDuringShutdown) {
                 } catch (JMSException e) {
                     // TODO Auto-generated catch block
                     e.printStackTrace();



Mime
View raw message