Author: sebb
Date: Thu Oct 16 16:57:25 2014
New Revision: 1632385
URL: http://svn.apache.org/r1632385
Log:
Keep trying
Modified:
commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
Modified:
commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java?rev=1632385&r1=1632384&r2=1632385&view=diff
==============================================================================
---
commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
(original)
+++
commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
Thu Oct 16 16:57:25 2014
@@ -491,12 +491,13 @@ public class MemoryLeakTestCase extends
list.clear();
list = null;
System.gc();
- System.out.println("After GC2: " + getMemoryStats());
+ System.out.println("After GC2: " + getMemoryStats()+ " Count " +
count);
Thread.sleep(1000);
}
- System.out.println("Count " + count); // debug for Continuum failure
- if (ref.get() != null) {
+ final boolean isNotNull = ref.get() != null;
+ System.out.println("Count " + count+ " " + isNotNull); // debug for
Continuum failure
+ if (isNotNull) {
throw new IllegalStateException("Your JVM is not releasing
SoftReference, try running the testcase with less memory (-Xmx)");
}
}