Saving JUnit VM Options
Answered
Hi, if i go Run-> Edit Configurations, click on Junit -> Configuration, VM Options then add "-Xmx12g" to the vm options and apply, OK. Then restart intellij, and look, the VM options are blank. I.e. they are not persisted on restart.
Am i doing something silly? All my unit tests, including new ones i'd like to write, need a lot of RAM so i'm trying to make this somewhat of a default for junit so appreciate any advice.
many thanks!
Intellij CE 2017.3, OSX 10.13.1 (17B1003)
Please sign in to leave a comment.
Edit the Default JUnit configuration under the Default node, all the new configurations will inherit this setting.
sorry, i think thats what im doing, the little cog/spanner icon that says "defaults"?
or somewhere else?
thanks
Exactly:
As you can see, the new run/debug configuration has inherited the -Xmx setting from the Default JUnit configuration.
Hi - yes, but if you then quit intellij and re-open, the default -xmx on Junit is lost and this step must be repeated each restart?
thanks
Indeed, it's a bug: https://youtrack.jetbrains.com/v2/issue/IDEA-183936.
Please check with IntelliJ IDEA 2017.3.2 EAP version available at https://confluence.jetbrains.com/display/IDEADEV/IDEA+2017.3+EAP.
Could you please try IntelliJ IDEA 2017.3.2 EAP (build 173.4127.2)? https://confluence.jetbrains.com/display/IDEADEV/IDEA+2017.3+EAP
hi - yeah that seems to have sorted it! Thanks for fixing so quickly!
I experience the same problem in 2018.1 for JBoss Server configuration. Adding VM options to the existing ones does not save them. It is strange since I've already created configuration and they have some VM options defined and persisted. Restart of IntelliJ doesn't help. Really strange issue :/
Ok, I've noticed it is only because I wanted to add -Djboss.socket.binding.port-offset=100 which has separate option under in JBoss Server configuration, so it looks like it is autocorrected and thrown away automatically. Quite confusing, especially that there's no message or whatsower informing the user why is that.
The other thing - if the IntellJ is intelligent enough to filter out this property and create by itself if user sets up the offset manually - why it cannot read that property and set the offset in the JBoss server configuration? :/ Thank you guys, I've lost couple of long coffe breaks for that.
Hello,
Feel free to add feature request for such notification on YouTrack: https://youtrack.jetbrains.com/issues/IDEA