The discovery of Ant JUnit task options

Prev – The problem with duplication

We use Ant and we were using fork=”yes” option of the ant junit task. After reading more, I understood that when fork option is turned ON, the default forkmode option is set as “perTest”. i.e. for every TestClass a new JVM gets created. Now this is an expensive operation. Instead of “perTest”, I used “once” option, which creates only one JVM for all the tests. With this option, the tests started failing due to permgen errors. After increasing the permgen memory size, the tests ran faster. The time was reduced further by about 20 minutes for our unit tests, though it was still taking over 30 minutes to run. Our SAS integration tests were still taking 50+ minutes to complete.

Next – The assumption around IO and SSD

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s