1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

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

View file

@ -19,12 +19,14 @@ package org.jivesoftware.smackx.muc;
import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.SmackTestSuite;
import org.jivesoftware.smack.util.MemoryLeakTestUtil; 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; import org.jxmpp.stringprep.XmppStringprepException;
public class MucMemoryLeakTest extends SmackTestSuite { public class MucMemoryLeakTest extends SmackTestSuite {
@Test @Test
@Disabled
public void mucMemoryLeakTest() throws XmppStringprepException, IllegalArgumentException, InterruptedException { public void mucMemoryLeakTest() throws XmppStringprepException, IllegalArgumentException, InterruptedException {
MemoryLeakTestUtil.noResourceLeakTest(c -> MultiUserChatManager.getInstanceFor(c)); MemoryLeakTestUtil.noResourceLeakTest(c -> MultiUserChatManager.getInstanceFor(c));
} }