add gc call
This commit is contained in:
parent
94451b11e1
commit
6d017585c8
1 changed files with 3 additions and 2 deletions
|
@ -110,14 +110,15 @@ public class FessXpathTransformerTest extends UnitFessTestCase {
|
|||
}
|
||||
|
||||
System.gc();
|
||||
for (int i = 0; i < 10; i++) {
|
||||
for (int i = 0; i < 30; i++) {
|
||||
if (MemoryUtil.getUsedMemory() < max - 100000000L) {
|
||||
break;
|
||||
}
|
||||
System.gc();
|
||||
Thread.sleep(1000L);
|
||||
}
|
||||
final long usedMemory = MemoryUtil.getUsedMemory();
|
||||
assertTrue(usedMemory + " < " + max + " -100000000L, " + MemoryUtil.getMemoryUsageLog(), usedMemory < max - 100000000L);
|
||||
assertTrue(usedMemory + " < " + max + " - 100000000L, " + MemoryUtil.getMemoryUsageLog(), usedMemory < max - 100000000L);
|
||||
}
|
||||
|
||||
private void setValueToObject(Object obj, String name, Object value) {
|
||||
|
|
Loading…
Add table
Reference in a new issue