https://issues.apache.org/jira/browse/AMQ-4213 - fix test regressions, add producer now correctly fails before a send

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1422875 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2012-12-17 11:48:38 +00:00
parent 95e6d6074f
commit 5a605c0fea
1 changed files with 6 additions and 4 deletions

View File

@ -86,9 +86,10 @@ public class CachedLDAPSecurityLegacyTest extends AbstractLdapTestUnit {
conn.start();
Queue queue = sess.createQueue("ADMIN.FOO");
MessageProducer producer = sess.createProducer(queue);
try {
producer.send(sess.createTextMessage("test"));
// https://issues.apache.org/jira/browse/AMQ-4213
// sync send on producer so it throws
MessageProducer producer = sess.createProducer(queue);
fail("expect auth exception");
} catch (JMSException expected) {
}
@ -102,9 +103,10 @@ public class CachedLDAPSecurityLegacyTest extends AbstractLdapTestUnit {
conn.start();
Queue queue = sess.createQueue("TEST.FOO,ADMIN.FOO");
MessageProducer producer = sess.createProducer(queue);
try {
producer.send(sess.createTextMessage("test"));
// https://issues.apache.org/jira/browse/AMQ-4213
// sync send on producer so it throws
MessageProducer producer = sess.createProducer(queue);
fail("expect auth exception");
} catch (JMSException expected) {
}