gemmellr commented on a change in pull request #3849:
URL: https://github.com/apache/activemq-artemis/pull/3849#discussion_r752182349
##########
File path:
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/balancing/MQTTRedirectTest.java
##########
@@ -121,5 +137,38 @@ public void testSimpleRedirect() throws Exception {
Assert.assertEquals(0, queueControl0.countMessages());
Wait.assertEquals(0, () -> queueControl1.countMessages());
}
+
+ @Test
+ public void testRoleNameKeyLocalTarget() throws Exception {
+
+ ActiveMQJAASSecurityManager securityManager = new
ActiveMQJAASSecurityManager("PropertiesLogin");
+ servers[0] =
addServer(ActiveMQServers.newActiveMQServer(createDefaultConfig(true).setSecurityEnabled(true),
ManagementFactory.getPlatformMBeanServer(), securityManager, false));
+ setupBalancerServerWithLocalTarget(0, TargetKey.ROLE_NAME, "b", "b");
+
+ startServers(0);
+
+ MqttConnectOptions connOpts = new MqttConnectOptions();
+ connOpts.setCleanSession(true);
+ connOpts.setUserName("a");
+ connOpts.setPassword("a".toCharArray());
+
+ MqttClient client0 = new MqttClient("tcp://" +
TransportConstants.DEFAULT_HOST + ":" + TransportConstants.DEFAULT_PORT,
"TEST", new MemoryPersistence());
+ try {
+ client0.connect(connOpts);
+ fail("Expect to be rejected as not in role0");
Review comment:
TargetKeyResolverTest and AmqpRedirectTest used role "B"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]