From commits-return-54528-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Tue Jan 8 00:10:14 2019 Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C59B18F9A for ; Tue, 8 Jan 2019 00:10:14 +0000 (UTC) Received: (qmail 70641 invoked by uid 500); 8 Jan 2019 00:10:14 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 70597 invoked by uid 500); 8 Jan 2019 00:10:14 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 70588 invoked by uid 99); 8 Jan 2019 00:10:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jan 2019 00:10:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2FACCE1241; Tue, 8 Jan 2019 00:10:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jgenender@apache.org To: commits@activemq.apache.org Message-Id: <1b9a51fdd62c4634b81c5b1bc5343af5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: activemq git commit: AMQ-7118 - Override hostname for naming to allow tests to apss on all platforms Date: Tue, 8 Jan 2019 00:10:14 +0000 (UTC) Repository: activemq Updated Branches: refs/heads/master b86c666c4 -> 273afef47 AMQ-7118 - Override hostname for naming to allow tests to apss on all platforms Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/273afef4 Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/273afef4 Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/273afef4 Branch: refs/heads/master Commit: 273afef47c9fef5258cc297ae7353b705db3efb6 Parents: b86c666 Author: Jeff Genender Authored: Mon Jan 7 17:03:20 2019 -0700 Committer: Jeff Genender Committed: Mon Jan 7 17:07:08 2019 -0700 ---------------------------------------------------------------------- .../src/test/java/org/apache/activemq/bugs/AMQ7118Test.java | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq/blob/273afef4/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ7118Test.java ---------------------------------------------------------------------- diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ7118Test.java b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ7118Test.java index 0e845d2..d637fb9 100644 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ7118Test.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ7118Test.java @@ -16,9 +16,11 @@ */ package org.apache.activemq.bugs; +import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerFactory; import org.apache.activemq.broker.BrokerService; +import org.apache.activemq.command.ConnectionId; import org.apache.commons.lang.StringUtils; import org.junit.After; import org.junit.Before; @@ -51,6 +53,7 @@ public class AMQ7118Test { private final String xbean = "xbean:"; private final String confBase = "src/test/resources/org/apache/activemq/bugs/amq7118"; int checkpointIndex = 0; + protected long idGenerator; private static final ActiveMQConnectionFactory ACTIVE_MQ_CONNECTION_FACTORY = new ActiveMQConnectionFactory(WIRE_LEVEL_ENDPOINT); @@ -67,6 +70,10 @@ public class AMQ7118Test { public void setupProducerConnection() throws Exception { producerConnection = ACTIVE_MQ_CONNECTION_FACTORY.createConnection(); + + //Small hack to be sure the message IDs are the same across platforms when testing + ((ActiveMQConnection)producerConnection).getConnectionInfo().setConnectionId(new ConnectionId("connection:" + (++idGenerator))); + producerConnection.start(); pSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); }