set the basedir property - so can be run from inside eclipse

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@490808 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-12-28 21:01:21 +00:00
parent 63d78acccc
commit a70f96bd37
1 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@
*/ */
package org.apache.activemq.broker.ft; package org.apache.activemq.broker.ft;
import java.io.File;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.JmsTopicSendReceiveWithTwoConnectionsTest; import org.apache.activemq.JmsTopicSendReceiveWithTwoConnectionsTest;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;
@ -38,6 +39,10 @@ public class QueueMasterSlaveTest extends JmsTopicSendReceiveWithTwoConnectionsT
protected String uriString="failover://(tcp://localhost:62001,tcp://localhost:62002)?randomize=false"; protected String uriString="failover://(tcp://localhost:62001,tcp://localhost:62002)?randomize=false";
protected void setUp() throws Exception{ protected void setUp() throws Exception{
if(System.getProperty("basedir")==null){
File file=new File(".");
System.setProperty("basedir",file.getAbsolutePath());
}
failureCount = super.messageCount/2; failureCount = super.messageCount/2;
super.topic = isTopic(); super.topic = isTopic();
BrokerFactoryBean brokerFactory=new BrokerFactoryBean(new ClassPathResource(getMasterXml())); BrokerFactoryBean brokerFactory=new BrokerFactoryBean(new ClassPathResource(getMasterXml()));