I'm running a lot of JUnit tests in parallel, and I frequently get results along the lines of "N tests passed, M tests failed, P tests not started" (in contrast to this question, where no tests start at all).
What can cause this? I tried the "invalidate cache" option, however, this does not appear to solve anything. I should mention that tests take a while longer to run than the average JUnit tests (they can take up to 90 seconds to run), could this have anything to do with it? Right now I simply press "rerun failed tests" until I have forced IntelliJ do run all of them, which is rather cumbersome. I'm not sending anything weird to System.out either, and as I've stated I do get them to run eventually.
It runs tests for about ten minutes, and then no further tests are started. Is there a timeout of some kind somewhere that I can't find?
Sometimes this appears in the console after this happens:
Process finished with exit code 255
Version details:
There is a timeout option for the @Test
annotation - have you tried increasing that?
And there is also a @Rule
and Timeout
option.
Info about Timeout for Tests - I hope it is relevant?
I faced the same problem. Solved by adding test platform in build.gradle.
test {
useJUnitPlatform()
}
Restart intelij by removing all modules and adding them again.
In my case, I resolved this issue by fixing some dependencies issue.
In my root pom.xml, I added this:
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.1.0</version>
<scope>test</scope>
</dependency>
and in my module, I added this:
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
and removed the old one:
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With