HyukjinKwon commented on a change in pull request #25630: 
[WIP][SPARK-28894][SQL][TESTS] Add a clue to make it easier to debug via 
Jenkins's test results
URL: https://github.com/apache/spark/pull/25630#discussion_r319463272
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -342,39 +342,44 @@ class SQLQueryTestSuite extends QueryTest with 
SharedSparkSession {
       stringToFile(resultFile, goldenOutput)
     }
 
-    // Read back the golden file.
-    val expectedOutputs: Seq[QueryOutput] = {
-      val goldenOutput = fileToString(new File(testCase.resultFile))
-      val segments = goldenOutput.split("-- !query.+\n")
-
-      // each query has 3 segments, plus the header
-      assert(segments.size == outputs.size * 3 + 1,
-        s"Expected ${outputs.size * 3 + 1} blocks in result file but got 
${segments.size}. " +
-        s"Try regenerate the result files.")
-      Seq.tabulate(outputs.size) { i =>
-        QueryOutput(
-          sql = segments(i * 3 + 1).trim,
-          schema = segments(i * 3 + 2).trim,
-          output = segments(i * 3 + 3).replaceAll("\\s+$", "")
-        )
+    // This is a temporary workaround for SPARK-28894. The test names are 
truncated after
+    // the last dot due to a bug in SBT. This makes easier to debug via 
Jenkins test result
+    // report. See SPARK-28894.
+    withClue(s"${testCase.name}${System.lineSeparator()}") {
 
 Review comment:
   Actual change is just:
   
   ```
   withClue(s"${testCase.name}${System.lineSeparator()}") {
     ...
   }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to