Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2670#discussion_r18473752
  
    --- Diff: 
core/src/test/scala/org/apache/spark/rdd/PairRDDFunctionsSuite.scala ---
    @@ -381,14 +382,13 @@ class PairRDDFunctionsSuite extends FunSuite with 
SharedSparkContext {
       }
     
       test("zero-partition RDD") {
    -    val emptyDir = Files.createTempDir()
    -    emptyDir.deleteOnExit()
    +    val emptyDir = Utils.createTempDir()
         val file = sc.textFile(emptyDir.getAbsolutePath)
    -    assert(file.partitions.size == 0)
    +    assert(file.partitions.isEmpty)
         assert(file.collect().toList === Nil)
         // Test that a shuffle on the file works, because this used to be a bug
         assert(file.map(line => (line, 1)).reduceByKey(_ + _).collect().toList 
=== Nil)
    -    emptyDir.delete()
    +    Utils.deleteRecursively(emptyDir)
    --- End diff --
    
    I know the shutdown hook should take care of this, but for that extra warm 
fuzzy feeling this should be in a `finally` block.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to