mirror of https://github.com/apache/activemq.git
some more autofail support to tests that can block a run
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1159581 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6994ecb5ac
commit
32c06a0b1b
|
@ -59,6 +59,7 @@ public class JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest extends JmsQ
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
|
setAutoFail(true);
|
||||||
// now lets asynchronously start a broker
|
// now lets asynchronously start a broker
|
||||||
Thread thread = new Thread() {
|
Thread thread = new Thread() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
|
@ -200,4 +200,11 @@ public abstract class TestSupport extends CombinationTestSupport {
|
||||||
return adapter;
|
return adapter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test if base directory contains spaces
|
||||||
|
*/
|
||||||
|
protected void assertBaseDirectoryContainsSpaces() {
|
||||||
|
assertFalse("Base directory cannot contain spaces.", new File(System.getProperty("basedir", ".")).getAbsoluteFile().toString().contains(" "));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,13 +35,14 @@ import javax.jms.TextMessage;
|
||||||
|
|
||||||
import junit.framework.AssertionFailedError;
|
import junit.framework.AssertionFailedError;
|
||||||
|
|
||||||
|
import org.apache.activemq.*;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class JmsSendReceiveTestSupport extends TestSupport implements MessageListener {
|
public abstract class JmsSendReceiveTestSupport extends org.apache.activemq.TestSupport implements MessageListener {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(JmsSendReceiveTestSupport.class);
|
private static final Logger LOG = LoggerFactory.getLogger(JmsSendReceiveTestSupport.class);
|
||||||
|
|
||||||
protected int messageCount = 100;
|
protected int messageCount = 100;
|
||||||
|
|
|
@ -73,20 +73,6 @@ public class PublishOnQueueConsumedMessageUsingActivemqXMLTest extends PublishOn
|
||||||
LOG.info("Broker closed...");
|
LOG.info("Broker closed...");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* clean up the journal
|
|
||||||
*/
|
|
||||||
|
|
||||||
protected static void recursiveDelete(File file) {
|
|
||||||
if (file.isDirectory()) {
|
|
||||||
File[] files = file.listFiles();
|
|
||||||
for (int i = 0; i < files.length; i++) {
|
|
||||||
recursiveDelete(files[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file.delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected BrokerService createBroker(String resource) throws Exception {
|
protected BrokerService createBroker(String resource) throws Exception {
|
||||||
return createBroker(new ClassPathResource(resource));
|
return createBroker(new ClassPathResource(resource));
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,20 +74,6 @@ public class PublishOnTopicConsumerMessageUsingActivemqXMLTest extends PublishOn
|
||||||
LOG.info("Broker closed...");
|
LOG.info("Broker closed...");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* clean up the journal
|
|
||||||
*/
|
|
||||||
|
|
||||||
protected static void recursiveDelete(File file) {
|
|
||||||
if (file.isDirectory()) {
|
|
||||||
File[] files = file.listFiles();
|
|
||||||
for (int i = 0; i < files.length; i++) {
|
|
||||||
recursiveDelete(files[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file.delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected BrokerService createBroker(String resource) throws Exception {
|
protected BrokerService createBroker(String resource) throws Exception {
|
||||||
return createBroker(new ClassPathResource(resource));
|
return createBroker(new ClassPathResource(resource));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue