Skip to content

Commit 01fe6c5

Browse files
committed
wait a bit between GCs to allow the other threads to finish collecting and any compiler threads to finish
1 parent 021e2e7 commit 01fe6c5

File tree

1 file changed

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

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ 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+
}
188193
System.gc();
189194
Runtime.getRuntime().freeMemory();
190195
server = ManagementFactory.getPlatformMBeanServer();

0 commit comments

Comments
 (0)