activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject activemq git commit: [AMQ-5875] add queue test variant to validate shared mkahaDb remains when one dest is deleted
Date Tue, 06 Dec 2016 14:54:44 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 9e3577894 -> dc68ad896


[AMQ-5875] add queue test variant to validate shared mkahaDb remains when one dest is deleted


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/dc68ad89
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/dc68ad89
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/dc68ad89

Branch: refs/heads/master
Commit: dc68ad89678eba9d18184f1a5342eb7ecf774596
Parents: 9e35778
Author: gtully <gary.tully@gmail.com>
Authored: Tue Dec 6 14:54:24 2016 +0000
Committer: gtully <gary.tully@gmail.com>
Committed: Tue Dec 6 14:54:24 2016 +0000

----------------------------------------------------------------------
 .../org/apache/activemq/bugs/AMQ4407Test.java   | 24 ++++++++++++++++++++
 1 file changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/dc68ad89/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4407Test.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4407Test.java b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4407Test.java
index 73d6d69..416d676 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4407Test.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4407Test.java
@@ -109,6 +109,30 @@ public class AMQ4407Test {
         assertEquals(1, destination2.getMessageStore().getMessageCount());
     }
 
+
+    @Test
+    public void testRemoveOfOneDestFromSharedPa() throws Exception {
+        // Ensure we have an Admin View.
+        assertTrue("Broker doesn't have an Admin View.", Wait.waitFor(new Wait.Condition()
{
+            @Override
+            public boolean isSatisified() throws Exception {
+                return (broker.getAdminView()) != null;
+            }
+        }));
+
+        // will both use first persistence adapter
+        sendMessage("queue.A", "test 1");
+        sendMessage("queue.B", "test 1");
+
+        broker.getAdminView().removeQueue("queue.A");
+
+        sendMessage("queue.B", "test 1");
+
+        Destination destination2 = broker.getDestination(new ActiveMQQueue("queue.B"));
+        assertNotNull(destination2);
+        assertEquals(2, destination2.getMessageStore().getMessageCount());
+    }
+
     protected KahaDBPersistenceAdapter createStore(boolean delete) throws IOException {
         KahaDBPersistenceAdapter kaha = new KahaDBPersistenceAdapter();
         kaha.setJournalMaxFileLength(maxFileLength);


Mime
View raw message