Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AFF9A200CD8 for ; Wed, 2 Aug 2017 18:50:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AEF8B169D3D; Wed, 2 Aug 2017 16:50:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 03CF9169D38 for ; Wed, 2 Aug 2017 18:50:42 +0200 (CEST) Received: (qmail 56684 invoked by uid 500); 2 Aug 2017 16:50:42 -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 56664 invoked by uid 99); 2 Aug 2017 16:50:41 -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; Wed, 02 Aug 2017 16:50:41 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 769E9DFDDD; Wed, 2 Aug 2017 16:50:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: clebertsuconic@apache.org To: commits@activemq.apache.org Date: Wed, 02 Aug 2017 16:50:41 -0000 Message-Id: <33b92bae5d48407584e2d4398209ce09@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] activemq-artemis git commit: ARTEMIS-1313 getAddresses in PostOfficeImpl does not correctly return all addresses archived-at: Wed, 02 Aug 2017 16:50:43 -0000 Repository: activemq-artemis Updated Branches: refs/heads/master 42dbd02bd -> 2eada40fb ARTEMIS-1313 getAddresses in PostOfficeImpl does not correctly return all addresses Fix so that getAddresses uses addressInfoMap instead of the mappings so that addresses without queues also are returned Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/776ec0b9 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/776ec0b9 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/776ec0b9 Branch: refs/heads/master Commit: 776ec0b9fd70f91c3f99b2606a14f3d7de2284fa Parents: 42dbd02 Author: Michael Andre Pearce Authored: Tue Aug 1 08:39:34 2017 +0100 Committer: Clebert Suconic Committed: Wed Aug 2 12:50:34 2017 -0400 ---------------------------------------------------------------------- .../artemis/core/postoffice/impl/SimpleAddressManager.java | 2 +- .../activemq/artemis/tests/integration/jms/RedeployTest.java | 2 ++ .../src/test/resources/reload-address-queues.xml | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/776ec0b9/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java index 347ac15..5a8164f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java @@ -169,7 +169,7 @@ public class SimpleAddressManager implements AddressManager { @Override public Set getAddresses() { Set addresses = new HashSet<>(); - addresses.addAll(mappings.keySet()); + addresses.addAll(addressInfoMap.keySet()); return addresses; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/776ec0b9/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java ---------------------------------------------------------------------- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java index 4260287..da50ac2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java @@ -136,6 +136,7 @@ public class RedeployTest extends ActiveMQTestBase { try { latch.await(10, TimeUnit.SECONDS); + Assert.assertNotNull(getAddressInfo(embeddedJMS, "config_test_address_removal_no_queue")); Assert.assertNotNull(getAddressInfo(embeddedJMS, "config_test_address_removal")); Assert.assertNotNull(getAddressInfo(embeddedJMS, "config_test_queue_removal")); Assert.assertTrue(listQueuesNamesForAddress(embeddedJMS, "config_test_queue_removal").contains("config_test_queue_removal_queue_1")); @@ -153,6 +154,7 @@ public class RedeployTest extends ActiveMQTestBase { embeddedJMS.getActiveMQServer().getReloadManager().setTick(tick); latch.await(10, TimeUnit.SECONDS); + Assert.assertNull(getAddressInfo(embeddedJMS, "config_test_address_removal_no_queue")); Assert.assertNull(getAddressInfo(embeddedJMS, "config_test_address_removal")); Assert.assertNotNull(getAddressInfo(embeddedJMS, "config_test_queue_removal")); Assert.assertTrue(listQueuesNamesForAddress(embeddedJMS, "config_test_queue_removal").contains("config_test_queue_removal_queue_1")); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/776ec0b9/tests/integration-tests/src/test/resources/reload-address-queues.xml ---------------------------------------------------------------------- diff --git a/tests/integration-tests/src/test/resources/reload-address-queues.xml b/tests/integration-tests/src/test/resources/reload-address-queues.xml index e9b42be..8fd2e9e 100644 --- a/tests/integration-tests/src/test/resources/reload-address-queues.xml +++ b/tests/integration-tests/src/test/resources/reload-address-queues.xml @@ -127,6 +127,10 @@ under the License. +
+ + +