Maven 故障安全性能?
我已经开始使用 Maven Failsafe 来正确实施集成测试。之前我使用 Surefire 运行所有测试。现在 Failsafe 运行 Surefire 不运行的功能。
运行“mvn clean verify”时,一切都会顺利进行,直到 Failsafe 运行为止。我不知道 Failsafe 的配置与 SureFire 有什么不同,但系统几乎立刻就停止了。变得几乎没有反应。它运行测试,但速度非常慢。
我正在使用 SureFire 的相同配置。我在这里缺少关于故障安全的特殊功能吗?线程?分叉?虫子?
显然它与 junit47 提供商有关。不使用时不会出现此行为。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.12</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<argLine>-XX:+UseCompressedOops -Xmx2g</argLine>
<includes>
<include>com/foo/bar/**/*Test.class</include>
</includes>
<groups>com.foo.bar.testing.IntegrationTests</groups>
</configuration>
</plugin>
I've started with Maven Failsafe to implement integration tests properly. Previously I was running all tests with Surefire. Now Failsafe runs those Surefire isn't.
When running "mvn clean verify" everything goes well until it's time for Failsafe to run. I don't know in what the configuration of Failsafe differs from SureFire, but almost immediately the system grinds to a halt. Becomes almost non-responsive. It runs the tests, but very slowly.
I'm using the very same configuration of SureFire. Is there something special about Failsafe I'm missing here ? Threads ? Forking ? Bugs ?
Apparently it's related to the junit47 provider. This behavior doesn't appear when it is not used.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.12</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<argLine>-XX:+UseCompressedOops -Xmx2g</argLine>
<includes>
<include>com/foo/bar/**/*Test.class</include>
</includes>
<groups>com.foo.bar.testing.IntegrationTests</groups>
</configuration>
</plugin>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论