nchammas commented on a change in pull request #31742:
URL: https://github.com/apache/spark/pull/31742#discussion_r587745794



##########
File path: core/src/test/scala/org/apache/spark/util/UtilsSuite.scala
##########
@@ -755,6 +755,16 @@ class UtilsSuite extends SparkFunSuite with 
ResetSystemProperties with Logging {
     assert(output.toList === List(Int.MaxValue, Int.MaxValue, 4, 3, 2, 
Int.MinValue, Int.MinValue))
   }
 
+  test("shutdown hook priorities") {
+    import org.apache.spark.util.ShutdownHookManager.{
+      DEFAULT_SHUTDOWN_PRIORITY,
+      SPARK_CONTEXT_SHUTDOWN_PRIORITY,
+      TEMP_DIR_SHUTDOWN_PRIORITY
+    }
+    assert(SPARK_CONTEXT_SHUTDOWN_PRIORITY < DEFAULT_SHUTDOWN_PRIORITY)
+    assert(TEMP_DIR_SHUTDOWN_PRIORITY < SPARK_CONTEXT_SHUTDOWN_PRIORITY)

Review comment:
       The comment blocks above these constants explain that they _must_ have a 
certain order to them. So I figured it would be helpful to check that ordering 
explicitly in a test.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to