Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the PermSize for scalatest-maven-plugin?

We're using scalatest-maven-plugin to run some spark tests, and the default perm size is around 80M, which is not enough, so we often got "OutOfMemoryError: PermGen".

I tried to give it a bigger size, but not found how to configure it

like image 360
Freewind Avatar asked Sep 26 '22 22:09

Freewind


1 Answers

You could use argLine config parameter as documented here http://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin

<plugin>
  <groupId>org.scalatest</groupId>
  <artifactId>scalatest-maven-plugin</artifactId>
  <version>1.0</version>
  <configuration>
    <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
    <junitxml>.</junitxml>
    <filereports>WDF TestSuite.txt</filereports>
    <argLine>-XX:MaxPermSize=128m</argLine>
  </configuration>
  <executions>
    <execution>
      <id>test</id>
      <goals>
        <goal>test</goal>
      </goals>
    </execution>
  </executions>
</plugin>
like image 173
jmj Avatar answered Sep 30 '22 07:09

jmj