From 3e74d11b45fc796984dcc2e8142c3bafad2919fe Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 3 Aug 2019 22:25:21 +0200 Subject: [PATCH] Disable MucMemoryLeakTest Although it it not that unreliable, it causes false negatives once in a while. This is because the standard Java SE API does not provide a way to force a *full* garbage collection run, we need to resort to unreliable hacks to trigger one. The test itself is still useful to diagnose or refute alleged memory leaks. This commit also move the test from JUnit 4 to Junit 5. --- .../java/org/jivesoftware/smackx/muc/MucMemoryLeakTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/MucMemoryLeakTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/MucMemoryLeakTest.java index ad7c24ebd..d9e35fefd 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/MucMemoryLeakTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/MucMemoryLeakTest.java @@ -19,12 +19,14 @@ package org.jivesoftware.smackx.muc; import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.MemoryLeakTestUtil; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.jxmpp.stringprep.XmppStringprepException; public class MucMemoryLeakTest extends SmackTestSuite { @Test + @Disabled public void mucMemoryLeakTest() throws XmppStringprepException, IllegalArgumentException, InterruptedException { MemoryLeakTestUtil.noResourceLeakTest(c -> MultiUserChatManager.getInstanceFor(c)); }