Skip to content
Snippets Groups Projects
Commit f1ffc6e7 authored by caoxuewen's avatar caoxuewen Committed by Sean Owen
Browse files

[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.xuewen@zte.com.cn>

Closes #17869 from heary-cao/SortShuffleSuite.
parent 190d8b0b
No related branches found
No related tags found
No related merge requests found
......@@ -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()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment