You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2012/10/29 20:21:20 UTC
svn commit: r1403466 -
/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java
Author: tabish
Date: Mon Oct 29 19:21:20 2012
New Revision: 1403466
URL: http://svn.apache.org/viewvc?rev=1403466&view=rev
Log:
apply patch for: https://issues.apache.org/jira/browse/AMQ-4142
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java?rev=1403466&r1=1403465&r2=1403466&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java Mon Oct 29 19:21:20 2012
@@ -21,7 +21,6 @@ import java.net.URI;
import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.Message;
-import javax.jms.MessageConsumer;
import javax.jms.Session;
import javax.jms.TemporaryTopic;
import javax.management.ObjectName;
@@ -45,6 +44,12 @@ public class SimpleAuthenticationPluginT
return suite(SimpleAuthenticationPluginTest.class);
}
+ @Override
+ protected void setUp() throws Exception {
+ setAutoFail(true);
+ super.setUp();
+ }
+
public static void main(String[] args) {
junit.textui.TestRunner.run(suite());
}
@@ -57,7 +62,7 @@ public class SimpleAuthenticationPluginT
LOG.info("Loading broker configuration from the classpath with URI: " + uri);
return BrokerFactory.createBroker(new URI("xbean:" + uri));
}
-
+
/**
* @see {@link CombinationTestSupport}
*/
@@ -66,13 +71,13 @@ public class SimpleAuthenticationPluginT
addCombinationValues("password", new Object[] {"password"});
addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST.Q")});
}
-
+
public void testPredefinedDestinations() throws JMSException {
- Message sent = doSend(false);
+ Message sent = doSend(false);
assertEquals("guest", ((ActiveMQMessage)sent).getUserID());
assertEquals("guest", sent.getStringProperty("JMSXUserID"));
}
-
+
public void testTempDestinations() throws Exception {
Connection conn = factory.createConnection("guest", "password");
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -83,7 +88,7 @@ public class SimpleAuthenticationPluginT
name += ",Destination=" + temp.getTopicName().replaceAll(":", "_");
fail("Should have failed creating a temp topic");
} catch (Exception ignore) {}
-
+
ObjectName objName = new ObjectName(name);
TopicViewMBean mbean = (TopicViewMBean)broker.getManagementContext().newProxyInstance(objName, TopicViewMBean.class, true);
try {