activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-105 forceFailover always throws exception
Date Wed, 24 Jun 2015 17:55:05 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master c6cba4088 -> 6babfee36


ARTEMIS-105 forceFailover always throws exception


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

Branch: refs/heads/master
Commit: 7c066c0ee49a2efc1a13c60f147888a66a674ad9
Parents: c6cba40
Author: jbertram <jbertram@apache.org>
Authored: Wed Jun 24 09:01:07 2015 -0500
Committer: jbertram <jbertram@apache.org>
Committed: Wed Jun 24 09:47:13 2015 -0500

----------------------------------------------------------------------
 .../core/management/impl/ActiveMQServerControlImpl.java     | 9 +--------
 .../artemis/core/server/impl/ActiveMQServerImpl.java        | 1 +
 .../integration/management/ActiveMQServerControlTest.java   | 8 ++++++++
 3 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c066c0e/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
index aeb9c6a..7f89610 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
@@ -1928,14 +1928,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements
Active
 
       clearIO();
 
-      try
-      {
-         server.stop(true);
-      }
-      finally
-      {
-         blockOnIO();
-      }
+      server.stop(true);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c066c0e/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index 23beca4..fddd13a 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -753,6 +753,7 @@ public class ActiveMQServerImpl implements ActiveMQServer
       messagingServerControl = null;
       memoryManager = null;
       backupManager = null;
+      storageManager = null;
 
       sessions.clear();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c066c0e/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
index 51c5c3e..c8f5d8b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
@@ -1019,6 +1019,14 @@ public class ActiveMQServerControlTest extends ManagementTestBase
       });
    }
 
+   @Test
+   public void testForceFailover() throws Exception
+   {
+      ActiveMQServerControl serverControl = createManagementControl();
+      serverControl.forceFailover();
+      assertFalse(server.isStarted());
+   }
+
    protected void scaleDown(ScaleDownHandler handler) throws Exception
    {
       SimpleString address = new SimpleString("testQueue");


Mime
View raw message