LuciferYang commented on code in PR #57948:
URL: https://github.com/apache/spark/pull/57948#discussion_r3799812503
##########
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/submit/K8sSubmitOpSuite.scala:
##########
@@ -55,6 +56,13 @@ class K8sSubmitOpSuite extends SparkFunSuite with
BeforeAndAfter {
@Mock
private var driverPodOperations2: PodResource = _
+ // A handle for a pod that does not exist. `withName` returns a handle
regardless, and `get`
+ // is what reports absence by returning null, so the missing pod has to be a
real mock rather
+ // than an unstubbed name: an unstubbed `withName` would return null and
make the buggy
+ // `Option(handle).isDefined` check take the false branch for the wrong
reason.
Review Comment:
Reworded in 22853991da7. The comment now explains the mock against the
post-fix code (`executeOnPod` resolves the handle, so an unstubbed name returns
null from `withName` and the test NPEs) rather than against the check being
deleted.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]