Repository: spark Updated Branches: refs/heads/master 190d8b0b6 -> f1ffc6e71
[SPARK-20609][CORE] Run the SortShuffleSuite unit tests have residual spark_* system directory ## What changes were proposed in this pull request? This PR solution to run the SortShuffleSuite unit tests have residual spark_* system directory For example: OS:Windows 7 After the running SortShuffleSuite unit tests, the system of TMP directory have '..\AppData\Local\Temp\spark-f64121f9-11b4-4ffd-a4f0-cfca66643503' not deleted ## How was this patch tested? Run SortShuffleSuite unit test. Author: caoxuewen <cao.xue...@zte.com.cn> Closes #17869 from heary-cao/SortShuffleSuite. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f1ffc6e7 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f1ffc6e7 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f1ffc6e7 Branch: refs/heads/master Commit: f1ffc6e71f5429464d4e98b00351427495c91e05 Parents: 190d8b0 Author: caoxuewen <cao.xue...@zte.com.cn> Authored: Mon May 22 14:23:23 2017 +0100 Committer: Sean Owen <so...@cloudera.com> Committed: Mon May 22 14:23:23 2017 +0100 ---------------------------------------------------------------------- core/src/test/scala/org/apache/spark/SortShuffleSuite.scala | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/f1ffc6e7/core/src/test/scala/org/apache/spark/SortShuffleSuite.scala ---------------------------------------------------------------------- diff --git a/core/src/test/scala/org/apache/spark/SortShuffleSuite.scala b/core/src/test/scala/org/apache/spark/SortShuffleSuite.scala index 7a897c2..c0126e4 100644 --- a/core/src/test/scala/org/apache/spark/SortShuffleSuite.scala +++ b/core/src/test/scala/org/apache/spark/SortShuffleSuite.scala @@ -38,6 +38,10 @@ class SortShuffleSuite extends ShuffleSuite with BeforeAndAfterAll { override def beforeAll() { super.beforeAll() + // Once 'spark.local.dir' is set, it is cached. Unless this is manually cleared + // before/after a test, it could return the same directory even if this property + // is configured. + Utils.clearLocalRootDirs() conf.set("spark.shuffle.manager", "sort") } @@ -50,6 +54,7 @@ class SortShuffleSuite extends ShuffleSuite with BeforeAndAfterAll { override def afterEach(): Unit = { try { Utils.deleteRecursively(tempDir) + Utils.clearLocalRootDirs() } finally { super.afterEach() } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org