Skip to content

Commit e901625

Browse files
committed
Run the SortShuffleSuite unit tests have residual spark_* system directory
1 parent 69bb771 commit e901625

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/test/scala/org/apache/spark/SortShuffleSuite.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ class SortShuffleSuite extends ShuffleSuite with BeforeAndAfterAll {
3838

3939
override def beforeAll() {
4040
super.beforeAll()
41+
// Once 'spark.local.dir' is set, it is cached. Unless this is manually cleared
42+
// before/after a test, it could return the same directory even if this property
43+
// is configured.
44+
Utils.clearLocalRootDirs()
4145
conf.set("spark.shuffle.manager", "sort")
4246
}
4347

@@ -50,6 +54,7 @@ class SortShuffleSuite extends ShuffleSuite with BeforeAndAfterAll {
5054
override def afterEach(): Unit = {
5155
try {
5256
Utils.deleteRecursively(tempDir)
57+
Utils.clearLocalRootDirs()
5358
} finally {
5459
super.afterEach()
5560
}

0 commit comments

Comments
 (0)