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 not work with None in the tuple also 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))
```
----------------------------------------------------------------
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]