Has anybody ever encountered the problem that grad...
# gradle
t
Has anybody ever encountered the problem that gradle test just run for ever? As you can see I also cannot stop the test (I already did this) but it is still running?
a
this sometimes happens if IntelliJ ‘misses’ the log message that says the tests have stopped running, so the test have actually stopped but IntelliJ doesn’t know that - so it keeps showing the tests as in progress
do the tests only hang when run from IntelliJ, or also from the console?
t
Aehh, tbh I have no idea how to run gradle from terminal.
i.e. I don't have it installe, will test it ASAP
a
ah okay, well hopefully you shouldn’t need to install anything. Is there a
gradlew
file in the root of your project? Just run that
./gradlew check
(or
./gradlew.bat check
for some versions of Windows)
t
I isntalled it
works with just gradle
v
But you shouldn't install it and never use an installed version to execute a build as Adam said. Practically all builds should have the 4 wrapper files and you should always use the wrapper to run the build as it defines the exact version with which to execute a build for which it is designed and known to be compatible with. Imho any build that does not have them has a bug.
But yeah, as Adam said, the build already finished it is just the "running" animation in IntelliJ that is still shown on sub nodes. If you select the top most node that also shows that it is finished already, you will also see the "build finished" message.
t
Ahh ok
Ok, I fixed it. Apparently I chose two different java version for intellij and gradle and this did work out. Thanks for your help
v
You probably just waited until the tests finished now. Cancel the test run and you should see the same behavior: https://youtrack.jetbrains.com/issue/IDEA-320132/Cancelled-Maven-Gradle-maybe-other-runs-still-shows-progress-indicator