hi, since the last update I'm experiencing flakine...
# intellij
s
hi, since the last update I'm experiencing flakiness in IntelliJ picking up test runs. I have a few configurations that run test gradle tasks, and lately when running them I get a
Test events were not received
in the Run tab. Did anyone also experience this or is it only me?
the test suites use
kotest
btw. All the other configurations (e.g. starting a Spring Boot application) work as usual
oh also: it doesn't happen 100% of the time 🤔
a
Are you using Gradle to run the tests? Perhaps the tests aren't run because they're up-to-date? (Up until recently IntelliJ forcibly broke Gradle's caching so the tests always ran, but that's fixed now, but some of the messaging hasn't been updated so it looks like the tests are flakey.)
s
Yes I am invoking Gradle in those configurations. Good to know about the cache fix, wasn’t aware of that. But then what would be the recommended way to setup a configuration to force run a test suite?
a
There are a few options, like
./gradlew --rerun test
, but it depends why you want to rerun tests? This blog goes into more detail https://blog.gradle.org/stop-rerunning-tests
s
Thanks @Adam S that’s very helpful 👍
Yeah I just realized that probably in my case the only reason is for tests that don’t directly call the exercised code (like end to end tests that spin up the app in a docker container), in which case Gradle most likely thinks nothing changed even if the underlying code did. But the post offers a couple of solutions even for that case
👍 1