我试图为v4.2.4.RELEASE的spring-framework运行gradle test
我使用Oracle JDK 1.8.0_31和Gradle 2.5
运行测试我在下面得到以下堆栈跟踪。 关于可能出现什么问题的任何线索?
[DEBUG] [TestEventLogger] org.springframework.test.context.junit4.RepeatedSpringRunnerTests > assertRepetitions[TimedRepeatedTestCase] FAILED
[DEBUG] [TestEventLogger] java.lang.AssertionError: tests failed for [class org.springframework.test.context.junit4.RepeatedSpringRunnerTests$TimedRepeatedTestCase]: expected:<3> but was:<2>
[DEBUG] [TestEventLogger] at org.junit.Assert.fail(Assert.java:88)
[DEBUG] [TestEventLogger] at org.junit.Assert.failNotEquals(Assert.java:834)
[DEBUG] [TestEventLogger] at org.junit.Assert.assertEquals(Assert.java:645)
[DEBUG] [TestEventLogger] at org.springframework.test.context.junit4.JUnitTestingUtils.runTestsAndAssertCounters(JUnitTestingUtils.java:97)
[DEBUG] [TestEventLogger] at org.springframework.test.context.junit4.RepeatedSpringRunnerTests.assertRepetitions(RepeatedSpringRunnerTests.java:92)
答案 0 :(得分:0)
运行清洁测试而不是简单的测试解决问题 显然第一次运行测试任务成功 但是如果第二次运行它会失败,除非运行干净的测试。