From f8de22478b1a8aa0767b90a147aafb544f66a3ab Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 8 May 2019 11:35:32 +0200 Subject: [PATCH] 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) --- .../java/org/jivesoftware/smack/util/MemoryLeakTestUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smack-core/src/test/java/org/jivesoftware/smack/util/MemoryLeakTestUtil.java b/smack-core/src/test/java/org/jivesoftware/smack/util/MemoryLeakTestUtil.java index ff768a7d5..f85b77469 100644 --- a/smack-core/src/test/java/org/jivesoftware/smack/util/MemoryLeakTestUtil.java +++ b/smack-core/src/test/java/org/jivesoftware/smack/util/MemoryLeakTestUtil.java @@ -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);