skonto commented on a change in pull request #23546: [SPARK-23153][K8s] Support client dependencies with a Hadoop Compatible File System URL: https://github.com/apache/spark/pull/23546#discussion_r276792156
########## File path: resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/KubernetesSuite.scala ########## @@ -306,8 +305,16 @@ class KubernetesSuite extends SparkFunSuite } }) - val patienceInterval = interval.getOrElse(INTERVAL) - Eventually.eventually(TIMEOUT, patienceInterval) { execPods.values.nonEmpty should be (true) } + val (patienceInterval, patienceTimeout) = { + executorPatience match { + case Some(patience) => (patience._1.getOrElse(INTERVAL), patience._2.getOrElse(TIMEOUT)) Review comment: It does work. Pattern matching on None is[ less idiomatic](https://www.scala-lang.org/api/2.9.0/scala/Option.html). I could even refactor to: ``` executorPatience.map(p => (p._1.getOrElse(INTERVAL), p._2.getOrElse(TIMEOUT))) .getOrElse((INTERVAL, TIMEOUT)) ``` but though it was more readable. You could do this btw: ``` val e: Option[(Option[String], Option[String])] = Some((Some("dsds"), Some("Dsds"))) e match { case Some((Some(x1), Some(x2))) => (x1, x2) case Some((Some(x1), None )) => (x1, "") case Some((None, Some(x1))) => ("", x1) 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org