如何为 scalatest-maven-plugin 设置 PermSize?

5
我们正在使用scalatest-maven-plugin来运行一些spark测试,而默认的perm大小约为80M,这是不够的,所以我们经常会遇到"OutOfMemoryError: PermGen"的问题。
我尝试给它一个更大的大小,但没有找到如何配置。
1个回答

4
您可以使用argLine配置参数,如此文档所述: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>

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接