Yikun commented on a change in pull request #35345:
URL: https://github.com/apache/spark/pull/35345#discussion_r797291183



##########
File path: 
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/PodBuilderSuite.scala
##########
@@ -66,6 +66,69 @@ abstract class PodBuilderSuite extends SparkFunSuite {
     assert(pod.container.getVolumeMounts.asScala.exists(_.getName == 
"so_long_two"))
   }
 
+  test("SPARK-37145: configure a custom test step with base config") {
+    val client = mockKubernetesClient()
+    val sparkConf = baseConf.clone()
+      .set(userFeatureStepsConf.key,
+          "org.apache.spark.deploy.k8s.TestStepWithConf")
+      .set(templateFileConf.key, "template-file.yaml")
+      .set("test-features-key", "test-features-value")
+    val pod = buildPod(sparkConf, client)
+    verifyPod(pod)
+    val metadata = pod.pod.getMetadata
+    assert(metadata.getAnnotations.containsKey("test-user-feature-annotation"))
+  }
+
+  test("SPARK-37145: configure a custom test step with driver or executor 
config") {
+    val client = mockKubernetesClient()
+    val (featureSteps, annotationKey) = this.getClass.getSimpleName match {

Review comment:
       Looks like we can't load a inner class:
   ```scala
   
org.apache.spark.scheduler.cluster.k8s.KubernetesExecutorBuilderSuite.TestStepWithExecConf
   java.lang.ClassNotFoundException: 
org.apache.spark.scheduler.cluster.k8s.KubernetesExecutorBuilderSuite.TestStepWithExecConf
        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
   ```
   
   so I added `userFeatureStepWithExpectedAnnotation` as your suggestion and 
put teststep into driversuite/executorsuite, just keep `TestStepWithExecConf` 
with same level with `KubernetesExecutorBuilderSuite`.
   
   




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