Ngone51 commented on a change in pull request #34651:
URL: https://github.com/apache/spark/pull/34651#discussion_r766717269



##########
File path: core/src/test/scala/org/apache/spark/SparkFunSuite.scala
##########
@@ -172,7 +173,18 @@ abstract class SparkFunSuite
     }
   }
 
-  protected def logForFailedTest(): Unit = {}
+  protected def logForFailedTest(): Unit = {
+    LocalSparkCluster.get.foreach { localCluster =>
+      val workerLogfiles = localCluster.workerLogfiles
+      if (workerLogfiles.nonEmpty) {
+        logInfo("\n\n===== EXTRA LOGS FOR THE FAILED TEST\n")
+        workerLogfiles.foreach { logFile =>
+          logInfo(s"\n----- Logfile: ${logFile.getAbsolutePath()}")
+          logInfo(FileUtils.readFileToString(logFile, "UTF-8"))

Review comment:
       This will be appended to the driver log or somewhere else?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to