I think I found a blocking issue within gradle. A missconfiguration of the dependencies leads to test failure, but gradle terminates successfully. In our case an artifact with some resources was not declared as dependency for the test execution. This leads to test failures, but gradle is running into 2 (!) StackOverflowErrors and terminates the build with SUCCESSFUL. I classify this as an blocking issue, because if there is a failing test, then gradle may not terminate with SUCCESSFUL.
This issue is reproducible with attached small project. This project contains 3 classes: MyTest, XmlParser and InternalError. MyTest implements a test for the XmlParser and should read an XML file. This XML file does not exists during the testRuntime and therefore the test will fail with an exception. In this case the exception will be an instance of InternalError which inherits from RuntimeException and overloads the method getMessage(), The implementation of getMessage throws also an InternalError. This small project was developed just for the use case to reproduce this issue. This issue occurs also in our productive build.
./gradlew test -S -Dorg.gradle.parallel=false --info has produced attached log.