cnauroth commented on code in PR #49893:
URL: https://github.com/apache/spark/pull/49893#discussion_r1951367358


##########
core/src/test/scala/org/apache/spark/util/UtilsSuite.scala:
##########
@@ -1005,9 +1005,7 @@ class UtilsSuite extends SparkFunSuite with 
ResetSystemProperties {
   test("Set Spark CallerContext") {
     val context = "test"
     new CallerContext(context).setCurrentContext()
-    if (CallerContext.callerContextEnabled) {
-      assert(s"SPARK_$context" === HadoopCallerContext.getCurrent.toString)
-    }
+    assert(s"SPARK_$context" === HadoopCallerContext.getCurrent.toString)

Review Comment:
   Maybe consider adding an assert-not-null like in the #49858 test? If this 
isn't working, or if someone disables it in pom.xml, then `toString` will cause 
NPE instead of an assertion failure message.



-- 
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]

Reply via email to