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.
This commit is contained in:
Florian Schmaus 2019-08-03 22:25:21 +02:00
parent efb206f7bd
commit 3e74d11b45
1 changed files with 3 additions and 1 deletions

View File

@ -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));
}