Eclipse JUnit tests do not work unless ./gradlew check was done before
Narigo opened this issue · 5 comments
This is a really strange behaviour when running with Eclipse JUnit. To reproduce, try this:
- ./gradlew clean cleanEclipse eclipse
- Right click on project "Run as -> JUnit Test"
There are two things then:
a) It complains that build/mods could not be created for the downloaded modules
b) If you create the build/ directory first, it can install the downloaded modules, but it still won't be able to find the "my-module".
There is a workaround to be able to run all the tests in eclipse, though:
- ./gradlew clean cleanEclipse eclipse check
This can be CTRL+C as soon as the tests run. - Right click on project "Run as -> JUnit Test"
Now it works. Even if you change something in the code: Running as JUnit test within Eclipse works with the new code then.
It definitely is a strange behaviour and should be changed if possible. If you happen to forget to build via gradle once, most of the tests fail and you don't really know why.
I think you're using an old version of Vert.x dependencies
I'm not sure what you mean by that. I pulled the latest vertx-gradle-template, did a clean of the eclipse project and a clean by gradle. When I do a ./gradlew eclipse, shouldn't it collect the latest Vert.x dependencies?
You need to use vertx-2.0.0-beta4-SNAPSHOT (current master)
Okay, you're right. It works if I update the gradle.properties file to have vertxVersion = 2.0.0-beta4-SNAPSHOT so it should be fixed when the final 2.0.0 comes out 👍