From 4cd4ecb198f328be1cd7932294b6d52d23e371b9 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Tue, 28 May 2024 21:17:33 -0500 Subject: [PATCH] ARTEMIS-4306 fix tests --- .../management/ActiveMQServerControlTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java index 190bab2440..0bd0327363 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java @@ -139,6 +139,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.lang.invoke.MethodHandles; +import static org.junit.Assume.assumeFalse; + @RunWith(Parameterized.class) public class ActiveMQServerControlTest extends ManagementTestBase { @@ -321,6 +323,9 @@ public class ActiveMQServerControlTest extends ManagementTestBase { @Test public void testAuthCounts() throws Exception { + // don't test this with management messages as it completely throws off the auth counts + assumeFalse(usingCore()); + ActiveMQServerControl serverControl = createManagementControl(); Assert.assertEquals(0, serverControl.getAuthenticationSuccessCount()); @@ -1138,7 +1143,7 @@ public class ActiveMQServerControlTest extends ManagementTestBase { String addressMatch = "test.#"; String exactAddress = "test.whatever"; - assertEquals(1, serverControl.getRoles(addressMatch).length); + assertEquals(2, serverControl.getRoles(addressMatch).length); serverControl.addSecuritySettings(addressMatch, "foo", "foo, bar", null, "bar", "foo, bar", "", "", "bar", "foo", "foo", "", ""); // Restart the server. Those settings should be persisted @@ -1218,7 +1223,7 @@ public class ActiveMQServerControlTest extends ManagementTestBase { assertFalse((boolean)barRole[10]); serverControl.removeSecuritySettings(addressMatch); - assertEquals(1, serverControl.getRoles(exactAddress).length); + assertEquals(2, serverControl.getRoles(exactAddress).length); } @Test