You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cs...@apache.org on 2016/07/28 17:12:01 UTC
[3/3] activemq git commit:
https://issues.apache.org/jira/browse/AMQ-6379
https://issues.apache.org/jira/browse/AMQ-6379
Fixing unit test so that it uses a random port and changing the default
platform details to be "java" if there is an error
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/7118247b
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/7118247b
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/7118247b
Branch: refs/heads/master
Commit: 7118247b658335839bc792dde8f70eee2acc1f18
Parents: 8d7d4e6
Author: Christopher L. Shannon (cshannon) <ch...@gmail.com>
Authored: Thu Jul 28 13:10:44 2016 -0400
Committer: Christopher L. Shannon (cshannon) <ch...@gmail.com>
Committed: Thu Jul 28 13:10:44 2016 -0400
----------------------------------------------------------------------
.../java/org/apache/activemq/ActiveMQConnectionMetaData.java | 2 +-
.../activemq/openwire/WireFormatInfoPropertiesTest.java | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/7118247b/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionMetaData.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionMetaData.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionMetaData.java
index 64ec077..ff6c38f 100755
--- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionMetaData.java
+++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionMetaData.java
@@ -157,7 +157,7 @@ public final class ActiveMQConnectionMetaData implements ConnectionMetaData {
* @return String containing the platform details
*/
private static String getPlatformDetails() {
- String details = "unknown";
+ String details = "java";
try {
StringBuilder platformInfo = new StringBuilder(128);
http://git-wip-us.apache.org/repos/asf/activemq/blob/7118247b/activemq-unit-tests/src/test/java/org/apache/activemq/openwire/WireFormatInfoPropertiesTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/openwire/WireFormatInfoPropertiesTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/openwire/WireFormatInfoPropertiesTest.java
index 6dfb6b1..5e90f87 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/openwire/WireFormatInfoPropertiesTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/openwire/WireFormatInfoPropertiesTest.java
@@ -31,6 +31,7 @@ import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.ActiveMQConnectionMetaData;
import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.TransportConnector;
import org.apache.activemq.command.WireFormatInfo;
import org.apache.activemq.transport.DefaultTransportListener;
import org.junit.Test;
@@ -42,8 +43,7 @@ public class WireFormatInfoPropertiesTest {
static final Logger LOG = LoggerFactory.getLogger(WireFormatInfoPropertiesTest.class);
protected BrokerService master;
-
- protected final String brokerUri = "tcp://localhost:61616";
+ protected String brokerUri;
@Test
public void testClientProperties() throws Exception{
@@ -104,7 +104,8 @@ public class WireFormatInfoPropertiesTest {
private BrokerService createBrokerService() throws Exception {
BrokerService service = new BrokerService();
- service.addConnector(brokerUri);
+ TransportConnector connector = service.addConnector("tcp://localhost:0");
+ brokerUri = connector.getPublishableConnectString();
service.setPersistent(false);
service.setUseJmx(false);
service.setBrokerName("Master");