【发布时间】:2020-12-23 18:18:02
【问题描述】:
当我使用 Junit 运行测试用例时,它通过但使用 mvn install 失败。
assertEquals(2, flight.getDelayCodes().getLocal().size());
[错误] 失败: [错误] FlightEventHandlerTest.testDelayCodesUpdateFields:302 预期: 但是:
我尝试通过添加junit依赖,仍然是同样的错误 尝试使用surefire插件仍然是同样的错误
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>always</forkMode>
<forkCount>4</forkCount>
<argLine>${argLine}</argLine>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<includes>
<include>**/*Test.java</include>
</includes>
<runOrder>failedfirst</runOrder>
</configuration>
</plugin>
【问题讨论】:
标签: spring junit junit-jupiter