Github user mccheah commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21884#discussion_r206699070
  
    --- Diff: 
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStepSuite.scala
 ---
    @@ -87,6 +87,10 @@ class BasicDriverFeatureStepSuite extends SparkFunSuite {
         assert(configuredPod.container.getImage === "spark-driver:latest")
         assert(configuredPod.container.getImagePullPolicy === 
CONTAINER_IMAGE_PULL_POLICY)
     
    +    val expectedPortNames = Set(DRIVER_PORT_NAME, BLOCK_MANAGER_PORT_NAME, 
UI_PORT_NAME)
    +    val foundPortNames = configuredPod.container.getPorts.asScala.map(port 
=> port.getName).toSet
    --- End diff --
    
    Better to be safer here and check the protocol and the target port numbers. 
You can just compare against a list of expected `ContainerPort` objects - 
Kubernetes objects in our Java API have been good about giving us sane `equals` 
implementations.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to