This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 93a4ed0 [SPARK-37735][K8S][TESTS][FOLLOWUP] Remove casting to
KubernetesConf in tests
93a4ed0 is described below
commit 93a4ed042feb0d82781bcc7578e9820355061609
Author: Martin Tzvetanov Grigorov <[email protected]>
AuthorDate: Sun Feb 6 23:24:46 2022 -0800
[SPARK-37735][K8S][TESTS][FOLLOWUP] Remove casting to KubernetesConf in
tests
### What changes were proposed in this pull request?
Minor simplification:
There is no need to cast
org.apache.spark.deploy.k8s.KubernetesDriverConf/KubernetesExecutorConf to
org.apache.spark.deploy.k8s.KubernetesConf in KubernetesConfSuite
Related-to: https://github.com/apache/spark/pull/35015
### Why are the changes needed?
Small simplification of the test code.
### Does this PR introduce _any_ user-facing change?
No!
### How was this patch tested?
Build and test KubernetesConfSuite#test("SPARK-37735: access appId in
KubernetesConf") {
Closes #35413 from martin-g/spark-37735-remove-casting.
Authored-by: Martin Tzvetanov Grigorov <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
.../test/scala/org/apache/spark/deploy/k8s/KubernetesConfSuite.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/KubernetesConfSuite.scala
b/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/KubernetesConfSuite.scala
index 1b3aaa5..d0a222d 100644
---
a/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/KubernetesConfSuite.scala
+++
b/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/KubernetesConfSuite.scala
@@ -222,8 +222,8 @@ class KubernetesConfSuite extends SparkFunSuite {
val sparkConf = new SparkConf(false)
val driverConf = KubernetesTestConf.createDriverConf(sparkConf)
val execConf = KubernetesTestConf.createExecutorConf(sparkConf)
- assert(driverConf.asInstanceOf[KubernetesConf].appId ===
KubernetesTestConf.APP_ID)
- assert(execConf.asInstanceOf[KubernetesConf].appId ===
KubernetesTestConf.APP_ID)
+ assert(driverConf.appId === KubernetesTestConf.APP_ID)
+ assert(execConf.appId === KubernetesTestConf.APP_ID)
}
test("SPARK-36566: get app name label") {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]