squito commented on a change in pull request #23393: [SPARK-26288][CORE]add 
initRegisteredExecutorsDB
URL: https://github.com/apache/spark/pull/23393#discussion_r263431651
 
 

 ##########
 File path: core/src/test/scala/org/apache/spark/deploy/worker/WorkerSuite.scala
 ##########
 @@ -243,4 +244,59 @@ class WorkerSuite extends SparkFunSuite with Matchers 
with BeforeAndAfter {
       ExecutorStateChanged("app1", 0, ExecutorState.EXITED, None, None))
     assert(cleanupCalled.get() == value)
   }
+
+  test("removes our metadata of all executors registered for the given " +
+    "application after WorkDirCleanup when config 
spark.shuffle.service.db.enabled=true") {
+    testWorkDirCleanupAndRemoveMetadataWithConfig(true)
+  }
+
+  test("don't removes our metadata of all executors registered for the given " 
+
+    "application after WorkDirCleanup when config 
spark.shuffle.service.db.enabled=false") {
+    testWorkDirCleanupAndRemoveMetadataWithConfig(false)
+  }
+
+  private def testWorkDirCleanupAndRemoveMetadataWithConfig(value: Boolean) = {
 
 Review comment:
   nit: rename `value` to something more meaningful, eg. `dbCleanupEnabled`

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

Reply via email to