Running JUnit test - Could not reserve enough space for 2097152KB object heap

已回答

Hi.

Others have posted similar problems but the answer given is always "Use a 64 bit JDK".

This is not an option - it is a 32 bit project relying on natives using 32-bit dlls - it must run in a 32bit JVM.

This is clearly a bug. -Xmx2048m is used on the JUnit runner command line, and I cannot find any way to remove it. Of course I can add a smaller Xmx into the command line args for the execution target, but this does not remove the -Xmx2048m and java uses the larger value.

Please let me know if a workaround is possible (and please fix the bug soon too!).

0

Liubov, I'm afraid that linked answer is not relevant. For a start the dropbox image link in that comment you linked to doesn't work. But more importantly, it addresses a completely different problem. The question you linked to is about intellij not starting. I'm not having a problem starting intelli.

Please re-read the question. Note that it is very specifically about running JUnit tests within the IDE. I can execute normal non-test targets just fine. But JUnit execution adds a -Xmx2048m to the java command line and there is no way (that I can see) or removing or overriding that. Adding -Xmx2048m to a 32-bit java command line is clearly a bug (100% guaranteed to fail), which thoroughly cripples intellij for 32 bit projects.

0

It seems to be a bug, but I couldn't find that anyone filed it on our tracker. Could you please do this: https://youtrack.jetbrains.com/newIssue?

0

请先登录再写评论。