You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2017/05/03 14:06:51 UTC

[1/2] activemq-artemis git commit: NO-JIRA: Trivial test fix

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 507374467 -> 2968e0a7d


NO-JIRA: Trivial test fix


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

Branch: refs/heads/master
Commit: 174b238b28c9cb1d2d184997dfd1a555ab8f63a5
Parents: 5073744
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed May 3 09:33:12 2017 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed May 3 09:33:12 2017 -0400

----------------------------------------------------------------------
 .../artemis/tests/integration/management/AddressControlTest.java    | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/174b238b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java
index 7bc648f..6c58a8a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java
@@ -338,6 +338,7 @@ public class AddressControlTest extends ManagementTestBase {
 
       session.createQueue(address, RoutingType.ANYCAST, address.concat('2'));
       producer.send(session.createMessage(false));
+      Wait.waitFor(() -> addressControl.getMessageCount() == 2);
       assertEquals(2, addressControl.getMessageCount());
    }
 


[2/2] activemq-artemis git commit: ARTEMIS-1102 Fixing Openwire test after security change

Posted by cl...@apache.org.
ARTEMIS-1102 Fixing Openwire test after security change


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

Branch: refs/heads/master
Commit: 2968e0a7dac85ad08fe34552e274f329e695fd94
Parents: 174b238
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed May 3 10:06:45 2017 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed May 3 10:06:45 2017 -0400

----------------------------------------------------------------------
 .../core/protocol/openwire/OpenWireProtocolManager.java   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2968e0a7/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
index 61eeb1c..09c6509 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
@@ -34,6 +34,7 @@ import io.netty.channel.ChannelPipeline;
 import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
 import org.apache.activemq.advisory.AdvisorySupport;
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
+import org.apache.activemq.artemis.api.core.ActiveMQSecurityException;
 import org.apache.activemq.artemis.api.core.BaseInterceptor;
 import org.apache.activemq.artemis.api.core.Interceptor;
 import org.apache.activemq.artemis.api.core.RoutingType;
@@ -289,7 +290,14 @@ public class OpenWireProtocolManager implements ProtocolManager<Interceptor>, Cl
       String username = info.getUserName();
       String password = info.getPassword();
 
-      validateUser(username, password, connection);
+      try {
+         validateUser(username, password, connection);
+      } catch (ActiveMQSecurityException e) {
+         // We need to send an exception used by the openwire
+         SecurityException ex = new SecurityException("User name [" + username + "] or password is invalid.");
+         ex.initCause(e);
+         throw ex;
+      }
 
       String clientId = info.getClientId();
       if (clientId == null) {