This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 42b826c075 ARTEMIS-5446 Fixing test leaking Server
42b826c075 is described below
commit 42b826c075fb5d9bd6db7261c2cd6c7721ee722c
Author: Clebert Suconic <[email protected]>
AuthorDate: Thu May 1 17:01:52 2025 -0400
ARTEMIS-5446 Fixing test leaking Server
---
.../apache/activemq/artemis/tests/leak/AckManagerLeakTest.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git
a/tests/leak-tests/src/test/java/org/apache/activemq/artemis/tests/leak/AckManagerLeakTest.java
b/tests/leak-tests/src/test/java/org/apache/activemq/artemis/tests/leak/AckManagerLeakTest.java
index 9504fb6309..a4ef097ca6 100644
---
a/tests/leak-tests/src/test/java/org/apache/activemq/artemis/tests/leak/AckManagerLeakTest.java
+++
b/tests/leak-tests/src/test/java/org/apache/activemq/artemis/tests/leak/AckManagerLeakTest.java
@@ -19,6 +19,8 @@ package org.apache.activemq.artemis.tests.leak;
import io.github.checkleak.core.CheckLeak;
import org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
+import org.apache.activemq.artemis.core.server.impl.ServerStatus;
import org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.junit.jupiter.api.Test;
@@ -43,5 +45,13 @@ public class AckManagerLeakTest extends ActiveMQTestBase {
MemoryAssertions.assertMemory(checkLeak, 0, AckManager.class.getName());
assertEquals(0, server.getExternalComponents().size());
MemoryAssertions.basicMemoryAsserts();
+
+ server = null;
+
+ clearServers();
+
+ ServerStatus.clear();
+
+ MemoryAssertions.assertMemory(checkLeak, 0,
ActiveMQServerImpl.class.getName());
}
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact