Github user Ngone51 commented on a diff in the pull request: https://github.com/apache/spark/pull/20199#discussion_r160344054 --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala --- @@ -58,7 +58,7 @@ class VersionsSuite extends SparkFunSuite with Logging { */ protected def withTempDir(f: File => Unit): Unit = { val dir = Utils.createTempDir().getCanonicalFile - try f(dir) finally Utils.deleteRecursively(dir) + f(dir) --- End diff -- Leave deletion work to ShutdownHookManager to avoid delete IOException caused by 'file occupation in other program' error on Windows. (SEE SPARK-22967) And temp dirs will be cleaned up after unit test completed, but this is only guaranteed for test(s"$version: SPARK-17920: Insert into/overwrite avro table"). And a lot of temp dirs produced by some other unit tests will still remains on Windows for unclear reason, maybe 'file occupation in other program ' too.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org