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

Double the timeout to 120s in MemoryLeakTestUtil

Because an failing test on Travis was observered using a timeout of
60s:

org.jivesoftware.smackx.muc.MucMemoryLeakTest > mucMemoryLeakTest FAILED
    java.lang.AssertionError: No reference found after 60000ms
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.assertTrue(Assert.java:41)
        at org.junit.Assert.assertNotNull(Assert.java:712)
        at org.jivesoftware.smack.util.MemoryLeakTestUtil.assertReferencesQueueSize(MemoryLeakTestUtil.java:110)
        at org.jivesoftware.smack.util.MemoryLeakTestUtil.noResourceLeakTest(MemoryLeakTestUtil.java:103)
        at org.jivesoftware.smackx.muc.MucMemoryLeakTest.mucMemoryLeakTest(MucMemoryLeakTest.java:29)
This commit is contained in:
Florian Schmaus 2019-05-08 11:35:32 +02:00
parent d2f5efcb20
commit f8de22478b

View file

@ -104,7 +104,7 @@ public class MemoryLeakTestUtil {
}
private static void assertReferencesQueueSize(ReferenceQueue<?> referenceQueue, int expectedSize) throws IllegalArgumentException, InterruptedException {
final int timeout = 60000;
final int timeout = 120000;
for (int itemsRemoved = 0; itemsRemoved < expectedSize; ++itemsRemoved) {
Reference<?> reference = referenceQueue.remove(timeout);
assertNotNull("No reference found after " + timeout + "ms", reference);