Skip to content

Commit 753b04d

Browse files
advancedxypwendell
authored andcommitted
[SPARK-1527] change rootDir*.getName to rootDir*.getAbsolutePath
JIRA issue: [SPARK-1527](https://issues.apache.org/jira/browse/SPARK-1527) getName() only gets the last component of the file path. When deleting test-generated directories, we should pass the generated directory's absolute path to DiskBlockManager. Author: Ye Xianjin <[email protected]> This patch had conflicts when merged, resolved by Committer: Patrick Wendell <[email protected]> Closes apache#436 from advancedxy/SPARK-1527 and squashes the following commits: 4678bab [Ye Xianjin] change rootDir*.getname to rootDir*.getAbsolutePath so the temporary directories are deleted when the test is finished.
1 parent 5c0dafc commit 753b04d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/test/scala/org/apache/spark/storage/DiskBlockManagerSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class DiskBlockManagerSuite extends FunSuite with BeforeAndAfterEach with Before
5252
rootDir0.deleteOnExit()
5353
rootDir1 = Files.createTempDir()
5454
rootDir1.deleteOnExit()
55-
rootDirs = rootDir0.getName + "," + rootDir1.getName
55+
rootDirs = rootDir0.getAbsolutePath + "," + rootDir1.getAbsolutePath
5656
println("Created root dirs: " + rootDirs)
5757
}
5858

0 commit comments

Comments
 (0)