HeartSaVioR commented on a change in pull request #34276:
URL: https://github.com/apache/spark/pull/34276#discussion_r730560111



##########
File path: 
core/src/test/scala/org/apache/spark/deploy/history/HistoryServerDiskManagerSuite.scala
##########
@@ -158,6 +159,19 @@ class HistoryServerDiskManagerSuite extends SparkFunSuite 
with BeforeAndAfter {
     assert(manager.approximateSize(50L, true) > 50L)
   }
 
+  test("Should be able to delete a store") {
+    val manager = mockManager()
+    val tempDir = Utils.createTempDir()
+    val deleteStore = PrivateMethod[Unit]('deleteStore)
+    try {
+      manager invokePrivate deleteStore(tempDir)

Review comment:
       To test the new behavior, we should make 
`FileUtils.deleteDirectory(path)` throwing an IOException despite the path 
exists, which I'm not sure how much work itself will bring. One thing I can 
imagine is to mock filesystem to react differently on condition, but I'm not 
sure it worths the effort.




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