pan3793 commented on code in PR #5168:
URL: https://github.com/apache/kyuubi/pull/5168#discussion_r1294950089
##########
kyuubi-server/src/test/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilderSuite.scala:
##########
@@ -305,6 +305,49 @@ class SparkProcessBuilderSuite extends
KerberizedTestHelper with MockitoSugar {
b1.toString.contains(
s"$CONF
spark.$KYUUBI_ENGINE_LOG_PATH_KEY=${b1.engineLog.getAbsolutePath}"))
}
+
+ test("[KYUUBI #5165] Test SparkProcessBuilder#appendDriverPodPrefix") {
+ val engineRefId = "kyuubi-test-engine"
+ val appName = "test-app"
+ val b1 = new SparkProcessBuilder("kyuubi", conf, engineRefId)
+ val conf1 = Map(SparkProcessBuilder.APP_KEY -> "test-app")
+ val map1 = b1.appendDriverPodPrefix(conf1)
+ assert(s"kyuubi-$appName-$engineRefId-driver" == map1(
+ SparkProcessBuilder.KUBERNETES_DRIVER_POD_NAME))
+ val conf2 =
+ conf1 ++ Map(SparkProcessBuilder.KUBERNETES_DRIVER_POD_NAME ->
"kyuubi-test-1-driver")
+ val map2 = b1.appendDriverPodPrefix(conf2)
+ assert("kyuubi-test-1-driver" ==
map2(SparkProcessBuilder.KUBERNETES_DRIVER_POD_NAME))
+ val longAppName =
"thisisalonglonglonglonglonglonglonglonglonglonglonglong" +
Review Comment:
Please add an app name starting with a Chinese char case.
--
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]