mirror of https://github.com/apache/activemq.git
Add an option to allow test cases to easily change the transformer
instance used by the AmqpProtocolConverter.
This commit is contained in:
parent
38a86b470f
commit
8f3e08c7b6
|
@ -124,22 +124,26 @@ public class AmqpTestSupport {
|
|||
TransportConnector connector = null;
|
||||
|
||||
if (isUseTcpConnector()) {
|
||||
connector = brokerService.addConnector("amqp://0.0.0.0:" + port);
|
||||
connector = brokerService.addConnector(
|
||||
"amqp://0.0.0.0:" + port + "?transport.transformer=" + getAmqpTransformer());
|
||||
port = connector.getConnectUri().getPort();
|
||||
LOG.debug("Using amqp port " + port);
|
||||
}
|
||||
if (isUseSslConnector()) {
|
||||
connector = brokerService.addConnector("amqp+ssl://0.0.0.0:" + sslPort);
|
||||
connector = brokerService.addConnector(
|
||||
"amqp+ssl://0.0.0.0:" + sslPort + "?transport.transformer=" + getAmqpTransformer());
|
||||
sslPort = connector.getConnectUri().getPort();
|
||||
LOG.debug("Using amqp+ssl port " + sslPort);
|
||||
}
|
||||
if (isUseNioConnector()) {
|
||||
connector = brokerService.addConnector("amqp+nio://0.0.0.0:" + nioPort);
|
||||
connector = brokerService.addConnector(
|
||||
"amqp+nio://0.0.0.0:" + nioPort + "?transport.transformer=" + getAmqpTransformer());
|
||||
nioPort = connector.getConnectUri().getPort();
|
||||
LOG.debug("Using amqp+nio port " + nioPort);
|
||||
}
|
||||
if (isUseNioPlusSslConnector()) {
|
||||
connector = brokerService.addConnector("amqp+nio+ssl://0.0.0.0:" + nioPlusSslPort);
|
||||
connector = brokerService.addConnector(
|
||||
"amqp+nio+ssl://0.0.0.0:" + nioPlusSslPort + "?transport.transformer=" + getAmqpTransformer());
|
||||
nioPlusSslPort = connector.getConnectUri().getPort();
|
||||
LOG.debug("Using amqp+nio+ssl port " + nioPlusSslPort);
|
||||
}
|
||||
|
@ -161,6 +165,10 @@ public class AmqpTestSupport {
|
|||
return false;
|
||||
}
|
||||
|
||||
protected String getAmqpTransformer() {
|
||||
return "jms";
|
||||
}
|
||||
|
||||
public void startBroker() throws Exception {
|
||||
if (brokerService != null) {
|
||||
throw new IllegalStateException("Broker is already created.");
|
||||
|
|
Loading…
Reference in New Issue