Skip to content

Commit c24ce2c

Browse files
garyrussellartembilan
authored andcommitted
Enable Verbose Test Logging from Gradle
With these options, we now see ``` KafkaAdminTests > testTopicConfigs() FAILED org.opentest4j.AssertionFailedError: Expecting: <2> to be equal to: <3> but was not. at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) at org.springframework.kafka.core.KafkaAdminTests.testTopicConfigs(KafkaAdminTests.java:84) ``` on the console. It is still useful to capture test results, in case we need to look at STDOUT.
1 parent 0b61b5d commit c24ce2c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

build.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,14 @@ subprojects { subproject ->
181181
[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:all,-options']
182182

183183
test {
184-
// suppress all console output during testing unless running `gradle -i`
185-
logging.captureStandardOutput(LogLevel.INFO)
184+
testLogging {
185+
events "skipped", "failed"
186+
showStandardStreams = project.hasProperty("showStandardStreams") ?: false
187+
showExceptions = true
188+
showStackTraces = true
189+
exceptionFormat = 'full'
190+
}
191+
186192
maxHeapSize = '1536m'
187193
// jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:8111'
188194
jacoco {

0 commit comments

Comments
 (0)