You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2015/10/09 18:11:04 UTC
qpid-jms git commit: NO-JIRA Add support for enabling a TCP OpenWire
TransportConnector to the Broker instance for testing that is better done
that way instead of over the VM Transport.
Repository: qpid-jms
Updated Branches:
refs/heads/master 782ca07f8 -> 6f06f1af2
NO-JIRA Add support for enabling a TCP OpenWire TransportConnector to
the Broker instance for testing that is better done that way instead of
over the VM Transport.
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/6f06f1af
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/6f06f1af
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/6f06f1af
Branch: refs/heads/master
Commit: 6f06f1af22f76b64cf423bed7540f8f07f8e10df
Parents: 782ca07
Author: Timothy Bish <ta...@gmail.com>
Authored: Fri Oct 9 12:10:48 2015 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Fri Oct 9 12:10:48 2015 -0400
----------------------------------------------------------------------
.../qpid/jms/support/AmqpTestSupport.java | 30 ++++++++++++++++++++
1 file changed, 30 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/6f06f1af/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/support/AmqpTestSupport.java
----------------------------------------------------------------------
diff --git a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/support/AmqpTestSupport.java b/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/support/AmqpTestSupport.java
index bc8b855..7b2cf72 100644
--- a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/support/AmqpTestSupport.java
+++ b/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/support/AmqpTestSupport.java
@@ -53,6 +53,23 @@ public class AmqpTestSupport extends QpidJmsTestSupport {
return 8 * 1024;
}
+ protected boolean isAddOpenWireConnector() {
+ return false;
+ }
+
+ @Override
+ public URI getBrokerActiveMQClientConnectionURI() {
+ if (isAddOpenWireConnector()) {
+ try {
+ return brokerService.getTransportConnectorByName("openwire").getPublishableConnectURI();
+ } catch (Exception e) {
+ throw new RuntimeException();
+ }
+ } else {
+ return super.getBrokerActiveMQClientConnectionURI();
+ }
+ }
+
@Override
protected void addAdditionalConnectors(BrokerService brokerService, Map<String, Integer> portMap) throws Exception {
int port = PORT;
@@ -72,6 +89,19 @@ public class AmqpTestSupport extends QpidJmsTestSupport {
}
port = connector.getPublishableConnectURI().getPort();
LOG.debug("Using amqp port: {}", port);
+
+ if (isAddOpenWireConnector()) {
+ if (portMap.containsKey("openwire")) {
+ port = portMap.get("openwire");
+ } else {
+ port = 0;
+ }
+
+ connector = brokerService.addConnector("tcp://0.0.0.0:" + port);
+ connector.setName("openwire");
+
+ LOG.debug("Using openwire port: {}", port);
+ }
}
public String getAmqpConnectionURIOptions() {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org