Adding -Xmx512m to your VM config for your JUnit test on Eclipse would spare you the agony of pulling your hair due to out of memory errors on your unit tests executed via the IDE. Sigh... my old fashioned ant build script has those and am now wondering why Eclipse doesn't make it the default VM config parameter? I've wasted half a day figuring out why my unit tests wouldn't run on the IDE but run when invoked thru good old command line.
Above config can be added to Eclipse by right clicking your JUnit test file and selecting Run As->Run... from the menu, select Arguments and add those to your VM arguments input box.
No comments:
Post a Comment