Browse Source

MINOR: Fix gradle error writing test stdout (#8133)

Adds a couple of extra checks to the test-output-capturing logic in our gradle build.
Previously, we were seeing a lot of error logs while attempting to write output for a
test whose output file hadn't been initialized.

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>
pull/8162/head
John Roesler 5 years ago committed by GitHub
parent
commit
7d6d386c4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      build.gradle

8
build.gradle

@ -252,7 +252,13 @@ subprojects { @@ -252,7 +252,13 @@ subprojects {
// code in the test (best guess is that it is tail output from last test). We won't have
// an output file for these, so simply ignore them. If they become critical for debugging,
// they can be seen with showStandardStreams.
if (td.name == td.className) {
if (td.name == td.className || td.className == null) {
// silently ignore output unrelated to specific test methods
return
} else if (logStreams.get(tid) == null) {
println "WARNING: unexpectedly got output for a test [${tid}]" +
" that we didn't previously see in the beforeTest hook." +
" Message for debugging: [" + toe.message + "]."
return
}
try {

Loading…
Cancel
Save