Sigh. I know <@U0FMXU16E> warned us, but IntelliJ ...
# minutest
d
Sigh. I know @christophsturm warned us, but IntelliJ now defaulting to Gradle to run tests is a royal pain. Not only do the names get rendered badly, but if you have
org.gradle.caching=true
then tests won't run at all if their results are cached.
c
is there a youtrack for the second problem? there should probably be issues for both
d
You can at least revert
m
the caching thing is definitely not great for the names, there is https://github.com/gradle/gradle/issues/5975 which probably factors into it
d
I thought they only delegated build/run by default, not test?
d
So build and run are through Gradle now? Test definitely changed to Gradle when I finally upgraded this morning, at least until I found the setting above. I’m actually in favour of the change overall - Gradle seems to be smart enough these days for me not to want a different IDE and CI build system. It’s just a shame that it doesn’t work well with JUnit dynamic tests. Maybe it’s time to shift over to our own test engine and deprecate the dynamic tests
d
The 'Run tests using' setting is unchanged - you'd have to set that to the Gradle test runner to actually have Gradle run the tests
Nice thing about the Gradle runner is it can run your tests in parallel
d
IntelliJ helpfully set Run Tests Using to Gradle on upgrade. I’m pretty sure it wasn’t that before.
I might try the parallel running - I’ve relied on parallel module building up to now, but it doesn’t help with a single module like Minutest. Does IntelliJ descramble the console output?
d
Yeah - those tests are off running in individual forks and Gradle's reporting the output back
I usually just do -
Copy code
tasks.withType(Test) {
        maxParallelForks = gradle.startParameter.maxWorkerCount
}
maxWorkerCount
is the number of cores on your machine
c
junit also has its own parallel running support and that is even faster because it does not fork