Fix activemq-unit-test failure

-- added addConnector() method so new connector can be created for tests
   -- fix zero-byte key store files that cause test failures
   -- fix a invm issue in test
This commit is contained in:
gaohoward 2015-07-09 09:10:15 +08:00
parent 5b75f59bd6
commit f59b10cea2
5 changed files with 5 additions and 8 deletions

View File

@ -431,7 +431,7 @@ public class BrokerService implements Service
public TransportConnector addConnector(String bindAddress) throws Exception
{
return null;
return addConnector(new URI(bindAddress));
}
public void setIoExceptionHandler(IOExceptionHandler ioExceptionHandler)
@ -653,6 +653,8 @@ public class BrokerService implements Service
public TransportConnector addConnector(URI bindAddress) throws Exception
{
Integer port = bindAddress.getPort();
this.extraConnectors.add(port);
return null;
}

View File

@ -64,11 +64,6 @@ public class ArtemisBrokerWrapper extends ArtemisBrokerBase
Set<TransportConfiguration> acceptors0 = serverConfig.getAcceptorConfigurations();
Iterator<TransportConfiguration> iter0 = acceptors0.iterator();
while (iter0.hasNext())
{
System.out.println("===>: " + iter0.next());
}
Map<String, AddressSettings> addressSettings = serverConfig.getAddressesSettings();
String match = "jms.queue.#";
AddressSettings dlaSettings = new AddressSettings();
@ -168,7 +163,7 @@ public class ArtemisBrokerWrapper extends ArtemisBrokerBase
while (iter.hasNext())
{
System.out.println(">: " + iter.next());
System.out.println("acceptor =>: " + iter.next());
}
server.start();

View File

@ -107,7 +107,7 @@ public class JmsTestSupport extends CombinationTestSupport {
}
protected ConnectionFactory createConnectionFactory() throws Exception {
return new ActiveMQConnectionFactory("vm://localhost");
return new ActiveMQConnectionFactory("tcp://localhost:61616");
}
protected BrokerService createBroker() throws Exception {

View File

View File