srowen commented on a change in pull request #25500: [SPARK-28778][MESOS] Fixed 
executors advertised address when running in virtual network
URL: https://github.com/apache/spark/pull/25500#discussion_r315934634
 
 

 ##########
 File path: 
resource-managers/mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackendUtilSuite.scala
 ##########
 @@ -50,4 +52,20 @@ class MesosSchedulerBackendUtilSuite extends SparkFunSuite {
     assert(params.get(2).getKey == "c")
     assert(params.get(2).getValue == "3")
   }
+
+  test("ContainerInfo respects Docker network configuration") {
+    val networkName = "test"
+    val conf = new SparkConf()
+    conf.set(config.CONTAINERIZER, "docker")
+    conf.set(config.EXECUTOR_DOCKER_IMAGE, "image")
+    conf.set(config.NETWORK_NAME, networkName)
+
+    val containerInfo = MesosSchedulerBackendUtil.buildContainerInfo(conf)
+
+    assert(containerInfo.getDocker.getNetwork == DockerInfo.Network.USER)
+    val params = containerInfo.getDocker.getParametersList
+    assert(params.size() == 1)
 
 Review comment:
   Very small nit, but if you make another round of changes, make the asserts 
use `===`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to