activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1329452 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java
Date Mon, 23 Apr 2012 21:12:03 GMT
Author: tabish
Date: Mon Apr 23 21:12:03 2012
New Revision: 1329452

URL: http://svn.apache.org/viewvc?rev=1329452&view=rev
Log:
Prevent these tests from hanging the hudson build

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java?rev=1329452&r1=1329451&r2=1329452&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java
Mon Apr 23 21:12:03 2012
@@ -23,6 +23,7 @@ import java.util.concurrent.atomic.Atomi
 
 import javax.jms.MessageConsumer;
 import javax.jms.TextMessage;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.JmsTopicSendReceiveWithTwoConnectionsTest;
 import org.apache.activemq.broker.BrokerService;
@@ -47,6 +48,8 @@ public class QueueMasterSlaveTest extend
     protected String uriString = "failover://(tcp://localhost:62001,tcp://localhost:62002)?randomize=false";
 
     protected void setUp() throws Exception {
+        setMaxTestTime(TimeUnit.MINUTES.toMillis(10));
+        setAutoFail(true);
         if (System.getProperty("basedir") == null) {
             File file = new File(".");
             System.setProperty("basedir", file.getAbsolutePath());
@@ -59,7 +62,6 @@ public class QueueMasterSlaveTest extend
         // wait for thing to connect
         Thread.sleep(1000);
         super.setUp();
-
     }
 
     protected String getSlaveXml() {
@@ -72,11 +74,11 @@ public class QueueMasterSlaveTest extend
 
     protected void tearDown() throws Exception {
         super.tearDown();
-        
-    	slaveStarted.await(5, TimeUnit.SECONDS);
+
+        slaveStarted.await(5, TimeUnit.SECONDS);
         BrokerService brokerService = slave.get();
         if( brokerService!=null ) {
-        	brokerService.stop();
+            brokerService.stop();
         }
         master.stop();
     }
@@ -96,16 +98,16 @@ public class QueueMasterSlaveTest extend
     protected boolean isTopic() {
         return false;
     }
-    
+
     protected void createMaster() throws Exception {
-		BrokerFactoryBean brokerFactory = new BrokerFactoryBean(new ClassPathResource(getMasterXml()));
-		brokerFactory.afterPropertiesSet();
-		master = brokerFactory.getBroker();
-		master.start();
+        BrokerFactoryBean brokerFactory = new BrokerFactoryBean(new ClassPathResource(getMasterXml()));
+        brokerFactory.afterPropertiesSet();
+        master = brokerFactory.getBroker();
+        master.start();
     }
-    
+
     protected void createSlave() throws Exception {
-    	BrokerFactoryBean brokerFactory = new BrokerFactoryBean(new ClassPathResource(getSlaveXml()));
+        BrokerFactoryBean brokerFactory = new BrokerFactoryBean(new ClassPathResource(getSlaveXml()));
         brokerFactory.afterPropertiesSet();
         BrokerService broker = brokerFactory.getBroker();
         broker.start();



Mime
View raw message