You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ya...@apache.org on 2021/07/18 13:44:20 UTC
[incubator-kyuubi] branch master updated: [KYUUBI #749] fix wrong
hint in test for update doc
This is an automated email from the ASF dual-hosted git repository.
yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 3100e8c [KYUUBI #749] fix wrong hint in test for update doc
3100e8c is described below
commit 3100e8c1727700d874ac5dd619b2c004e513d188
Author: Min Zhao <zh...@163.com>
AuthorDate: Sun Jul 18 21:44:04 2021 +0800
[KYUUBI #749] fix wrong hint in test for update doc
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
fix wrong hint in test for update doc
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request
Closes #827 from zhaomin1423/kyuubi_749.
Closes #749
a2b10247 [Min Zhao] fix wrong hint in test for update doc
Authored-by: Min Zhao <zh...@163.com>
Signed-off-by: Kent Yao <ya...@apache.org>
---
docs/sql/functions.md | 2 +-
.../kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala | 7 ++-----
kyuubi-common/src/test/scala/org/apache/kyuubi/TestUtils.scala | 4 ++--
.../scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala | 2 +-
4 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/docs/sql/functions.md b/docs/sql/functions.md
index 44d0fb5..90a09e5 100644
--- a/docs/sql/functions.md
+++ b/docs/sql/functions.md
@@ -1,4 +1,4 @@
-<!-- DO NOT MODIFY THIS FILE DIRECTLY, IT IS AUTO GENERATED BY [org.apache.kyuubi.engine.spark.udf.KyuubiUDFRegistrySuite] -->
+<!-- DO NOT MODIFY THIS FILE DIRECTLY, IT IS AUTO GENERATED BY [org.apache.kyuubi.engine.spark.udf.KyuubiDefinedFunctionSuite] -->
<div align=center>
diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala
index 6383dbc..0dd55dc 100644
--- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala
+++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala
@@ -33,7 +33,7 @@ class KyuubiDefinedFunctionSuite extends KyuubiFunSuite {
test("verify or update kyuubi spark sql functions") {
val newOutput = new ArrayBuffer[String]()
newOutput += "<!-- DO NOT MODIFY THIS FILE DIRECTLY, IT IS AUTO GENERATED BY" +
- " [org.apache.kyuubi.engine.spark.udf.KyuubiUDFRegistrySuite] -->"
+ " [org.apache.kyuubi.engine.spark.udf.KyuubiDefinedFunctionSuite] -->"
newOutput += ""
newOutput += "<div align=center>"
newOutput += ""
@@ -55,9 +55,6 @@ class KyuubiDefinedFunctionSuite extends KyuubiFunSuite {
}
newOutput += ""
-
- TestUtils.verifyOutput(markdown, newOutput)
-
+ TestUtils.verifyOutput(markdown, newOutput, getClass.getCanonicalName)
}
-
}
diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/TestUtils.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/TestUtils.scala
index 79a0b67..fb0ce69 100644
--- a/kyuubi-common/src/test/scala/org/apache/kyuubi/TestUtils.scala
+++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/TestUtils.scala
@@ -26,7 +26,7 @@ import org.scalatest.Assertions.convertToEqualizer
object TestUtils {
- def verifyOutput(markdown: Path, newOutput: ArrayBuffer[String]): Unit = {
+ def verifyOutput(markdown: Path, newOutput: ArrayBuffer[String], agent: String): Unit = {
if (System.getenv("KYUUBI_UPDATE") == "1") {
val writer = Files.newBufferedWriter(
markdown, StandardCharsets.UTF_8,
@@ -51,7 +51,7 @@ object TestUtils {
}
reader.close()
val hint = s"$markdown out of date, please update doc with build/mvn test" +
- s" -DwildcardSuites=${getClass.getCanonicalName}"
+ s" -DwildcardSuites=$agent"
assert(newOutput.size === expected.size, hint)
newOutput.zip(expected).foreach { case (out, in) => assert(out === in, hint) }
diff --git a/kyuubi-main/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala b/kyuubi-main/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala
index cb02275..7e23c28 100644
--- a/kyuubi-main/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala
+++ b/kyuubi-main/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala
@@ -259,6 +259,6 @@ class AllKyuubiConfiguration extends KyuubiFunSuite {
" executor and obey the Spark AQE behavior of Kyuubi system default. On the other hand," +
" for those users who do not have custom configurations will use system defaults."
- TestUtils.verifyOutput(markdown, newOutput)
+ TestUtils.verifyOutput(markdown, newOutput, getClass.getCanonicalName)
}
}