mirror of https://github.com/apache/activemq.git
broker is already started automatically
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@357125 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9359ba25b6
commit
df6f3ba32a
|
@ -32,6 +32,7 @@ import org.activemq.store.memory.MemoryPersistenceAdapter;
|
||||||
import org.activemq.store.jdbc.JDBCPersistenceAdapter;
|
import org.activemq.store.jdbc.JDBCPersistenceAdapter;
|
||||||
import org.activemq.store.journal.JournalPersistenceAdapter;
|
import org.activemq.store.journal.JournalPersistenceAdapter;
|
||||||
import org.activemq.memory.UsageManager;
|
import org.activemq.memory.UsageManager;
|
||||||
|
import org.activemq.ActiveMQConnectionFactory;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
import org.springframework.core.io.FileSystemResource;
|
import org.springframework.core.io.FileSystemResource;
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
|
@ -70,10 +71,14 @@ public class ConfigTest extends TestCase {
|
||||||
|
|
||||||
// Create broker from resource
|
// Create broker from resource
|
||||||
System.out.print("Creating broker... ");
|
System.out.print("Creating broker... ");
|
||||||
broker = createBroker("org/activemq/config/example.xml");
|
broker = createBroker("org/activemq/config/activemq.xml");
|
||||||
System.out.println("Success");
|
System.out.println("Success");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
// ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
|
||||||
|
// factory.
|
||||||
|
/*
|
||||||
// Check broker configuration
|
// Check broker configuration
|
||||||
System.out.print("Checking broker configurations... ");
|
System.out.print("Checking broker configurations... ");
|
||||||
assertEquals("Broker Config Error (brokerName)", "brokerConfigTest", broker.getBrokerName());
|
assertEquals("Broker Config Error (brokerName)", "brokerConfigTest", broker.getBrokerName());
|
||||||
|
@ -191,9 +196,15 @@ public class ConfigTest extends TestCase {
|
||||||
System.out.print("Checking if persistence adapter was succesfully created... ");
|
System.out.print("Checking if persistence adapter was succesfully created... ");
|
||||||
assertTrue("Should have created a journal persistence adapter", broker.getPersistenceAdapter() instanceof JournalPersistenceAdapter);
|
assertTrue("Should have created a journal persistence adapter", broker.getPersistenceAdapter() instanceof JournalPersistenceAdapter);
|
||||||
System.out.println("Success");
|
System.out.println("Success");
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
}catch(Exception e){
|
||||||
|
fail("Exception Starting Broker: "+ e.toString());
|
||||||
} finally {
|
} finally {
|
||||||
|
System.out.println("*******************");
|
||||||
if (broker != null) {
|
if (broker != null) {
|
||||||
broker.stop();
|
broker.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue