dongjoon-hyun commented on code in PR #35663:
URL: https://github.com/apache/spark/pull/35663#discussion_r947471945


##########
resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/YuniKornTestsSuite.scala:
##########
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.spark.deploy.k8s.integrationtest
+
+import io.fabric8.kubernetes.api.model.Pod
+
+import org.apache.spark.SparkFunSuite
+import org.apache.spark.deploy.k8s.features.YuniKornFeatureStep
+import org.apache.spark.deploy.k8s.integrationtest.KubernetesSuite.k8sTestTag
+import org.apache.spark.deploy.k8s.integrationtest.YuniKornSuite.yunikornTag
+
+private[spark] trait YuniKornTestsSuite { k8sSuite: KubernetesSuite =>
+  import YuniKornTestsSuite._
+
+  protected def checkScheduler(pod: Pod): Unit = {
+    assert(pod.getSpec.getSchedulerName === YuniKornFeatureStep.SchedulerName)
+  }
+
+  protected def checkAnnotations(pod: Pod): Unit = {
+    val appId = pod.getMetadata.getLabels.get("spark-app-selector")
+    val annotations = pod.getMetadata.getAnnotations
+    assert(annotations.get(YuniKornFeatureStep.AppIdAnnotationKey) === appId)
+  }
+
+  test("Run SparkPi with yunikorn scheduler", k8sTestTag, yunikornTag) {

Review Comment:
   We need the actual YuniKorn feature test coverage here. Otherwise, we cannot 
prevent the future regression. Technically, I don't think `YuniKorn` has less 
features than `Volcano` scheduler. At least, we need similar test coverage with 
`Volcano` and it would be great if we can have more test coverage about 
`YuniKorn`'s specialty. FYI, we have at least the following test coverage at 
least at `Volcano`.
   
   
https://github.com/apache/spark/blob/74deefb789452c097003a958707adbcb8b2bfd38/resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/VolcanoTestsSuite.scala#L304
   
   
https://github.com/apache/spark/blob/74deefb789452c097003a958707adbcb8b2bfd38/resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/VolcanoTestsSuite.scala#L321
   
   
https://github.com/apache/spark/blob/74deefb789452c097003a958707adbcb8b2bfd38/resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/VolcanoTestsSuite.scala#L338
   
   
https://github.com/apache/spark/blob/74deefb789452c097003a958707adbcb8b2bfd38/resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/VolcanoTestsSuite.scala#L360
   
   
https://github.com/apache/spark/blob/74deefb789452c097003a958707adbcb8b2bfd38/resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/VolcanoTestsSuite.scala#L380



-- 
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