NO-JIRA: fix checkstyle broken after c38c5a91aa

This commit is contained in:
Clebert Suconic 2016-12-13 15:53:22 -05:00
parent 33af9901c6
commit d5be1c6dc6
1 changed files with 6 additions and 10 deletions

View File

@ -483,7 +483,6 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
@Test
public void testRemoteCFWithTCPUserPassword() throws Exception {
//setup user and role on broker
((ActiveMQJAASSecurityManager) liveService.getSecurityManager()).getConfiguration().addUser("myUser", "myPassword");
((ActiveMQJAASSecurityManager) liveService.getSecurityManager()).getConfiguration().addRole("myUser", "consumeCreateRole");
@ -499,13 +498,11 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
props.put("connectionFactory.myConnectionFactory", "tcp://127.0.0.1:61616?user=myUser&password=myPassword");
Context ctx = new InitialContext(props);
//create a connection factory
ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
Assert.assertEquals("ensure user is set", "myUser", connectionFactory.getUser());
Assert.assertEquals("ensure password is set", "myPassword", connectionFactory.getPassword());
//Connect to broker to verify credentials are used with connection
Connection connection = connectionFactory.createConnection();
connection.start();
@ -524,7 +521,6 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
}
MessageConsumer consumer = session.createConsumer(queue);
} finally {
connection.close();
}