This is an automated email from the ASF dual-hosted git repository.

vvcephei pushed a commit to branch 2.4
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.4 by this push:
     new 61e3e65  MINOR: Fix gradle error writing test stdout (#8133)
61e3e65 is described below

commit 61e3e65c063e1024db3f0da68b324f059838a63b
Author: John Roesler <vvcep...@users.noreply.github.com>
AuthorDate: Wed Feb 26 11:10:00 2020 -0600

    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 <e...@confluent.io>
---
 build.gradle | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/build.gradle b/build.gradle
index 121d1eb..6edbd02 100644
--- a/build.gradle
+++ b/build.gradle
@@ -246,7 +246,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 {

Reply via email to