You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2023/01/30 09:28:27 UTC

[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4212: Show line number and assertion when verifying generated markdown files in lines

pan3793 commented on code in PR #4212:
URL: https://github.com/apache/kyuubi/pull/4212#discussion_r1090365445


##########
kyuubi-common/src/test/scala/org/apache/kyuubi/TestUtils.scala:
##########
@@ -92,11 +92,13 @@ object TestUtils {
     } else {
       val linesInFile = Files.readAllLines(markdown, StandardCharsets.UTF_8)
       val formatted = formatMarkdown(newOutput)
-      val hint = s"$markdown out of date, please update doc with " +
-        s"KYUUBI_UPDATE=1 build/mvn clean install -Pflink-provided,spark-provided,hive-provided " +
-        s"-DwildcardSuites=$agent"
-      assert(linesInFile.size() === formatted.size, hint)
-      linesInFile.asScala.zip(formatted).foreach { case (out, in) => assert(out === in, hint) }
+      linesInFile.asScala.zipWithIndex.zip(formatted).foreach { case ((str1, index), str2) =>
+        withClue(s"$markdown out of date, as line ${index + 1} is not expected." +
+          s" Please update doc with KYUUBI_UPDATE=1 build/mvn clean install" +
+          s" -Pflink-provided,spark-provided,hive-provided -DwildcardSuites=$agent") {

Review Comment:
   The following command should be sufficient and faster
   ```
   KYUUBI_UPDATE=1 build/mvn clean test -Pflink-provided,spark-provided,hive-provided  -pl kyuubi-server -am -DwildcardSuites=org.apache.kyuubi.config.AllKyuubiConfiguration
   ```



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org