search

Home  >  Q&A  >  body text

java - maven的单元测试如何设置为单线程单进程串行执行?

PHPzPHPz2898 days ago446

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-18 10:39:45

    You still have to document at the critical moment. . .

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.19.1</version>
            <configuration>
                <forkCount>1</forkCount>    //虚拟机的最大线程数
                <reuseForks>false</reuseForks>    //虚拟机是否可以重用
            </configuration>
        </plugin>

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 10:39:45

    mvn-T1 How about?

    reply
    0
  • Cancelreply