Skip to content

Commit 9a5139d

Browse files
committed
Give LeakTest more time for GC
1 parent 10d36da commit 9a5139d

File tree

1 file changed

+5
-5
lines changed
  • graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/advance

1 file changed

+5
-5
lines changed

graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/advance/LeakTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,6 @@ private MBeanServer doFullGC() {
185185
// do this a few times to dump a small heap if we can
186186
MBeanServer server = null;
187187
for (int i = 0; i < 10; i++) {
188-
try {
189-
Thread.sleep(1000);
190-
} catch (InterruptedException e1) {
191-
// do nothing
192-
}
193188
System.gc();
194189
Runtime.getRuntime().freeMemory();
195190
server = ManagementFactory.getPlatformMBeanServer();
@@ -199,6 +194,11 @@ private MBeanServer doFullGC() {
199194
} catch (MalformedObjectNameException | InstanceNotFoundException | ReflectionException | MBeanException e) {
200195
throw new RuntimeException(e);
201196
}
197+
try {
198+
Thread.sleep(3000);
199+
} catch (InterruptedException e1) {
200+
// do nothing
201+
}
202202
}
203203
return server;
204204
}

0 commit comments

Comments
 (0)