Thursday, August 6, 2009

TestNG + EasyMock - OutOfMemoryException

As much as I liked TestNG and Easy mock a few months back I am starting to hate it as well. We have a suite of around 500 unit tests (maybe just a bit less than that) and we get OutOfMemoryException. We get these running locally and on running on Hudson CI. On further research I found these two links that explain this problem. BTW we run with JAVAOPTS -Xmx128m. Increasing the memory does not help, I dont know why.
EasyMock OutOfMemoryException

TestNG OutOfMemoryException

Too bad the TestNG defect is open for almost 10 months and not fixed.

For now we segmented the unit tests into two groups - unit1 and unit2. This is working well, however I anticipate issues now with the corbertura reports that we want out of CI. Also, next time we hit the wall on unit2 we will have to start a new group - unit3 ... Arrrr !