add autofail as mqtttest seems to hang ci build in jenkins atm

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1350016 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2012-06-13 21:04:28 +00:00
parent dc258ab2ae
commit e32d6f6645
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,7 @@ import javax.jms.Session;
import javax.jms.TextMessage; import javax.jms.TextMessage;
import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.AutoFailTestSupport;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQMessage;
import org.apache.activemq.util.ByteSequence; import org.apache.activemq.util.ByteSequence;
@ -49,9 +50,11 @@ public class MQTTTest {
protected BrokerService brokerService; protected BrokerService brokerService;
protected Vector<Throwable> exceptions = new Vector<Throwable>(); protected Vector<Throwable> exceptions = new Vector<Throwable>();
protected int numberOfMessages; protected int numberOfMessages;
AutoFailTestSupport autoFailTestSupport = new AutoFailTestSupport() {};
@Before @Before
public void startBroker() throws Exception { public void startBroker() throws Exception {
autoFailTestSupport.startAutoFailThread();
exceptions.clear(); exceptions.clear();
brokerService = new BrokerService(); brokerService = new BrokerService();
brokerService.setPersistent(false); brokerService.setPersistent(false);
@ -64,6 +67,7 @@ public class MQTTTest {
if (brokerService != null) { if (brokerService != null) {
brokerService.stop(); brokerService.stop();
} }
autoFailTestSupport.stopAutoFailThread();
} }
@Test @Test