diff --git a/core/src/test/scala/org/apache/spark/storage/DiskBlockManagerSuite.scala b/core/src/test/scala/org/apache/spark/storage/DiskBlockManagerSuite.scala
index 2167718fd242815244f30ffb0a03e7db1a19f6a3..aaa77140497326f6db25e508d18e02ef54cc19c7 100644
--- a/core/src/test/scala/org/apache/spark/storage/DiskBlockManagerSuite.scala
+++ b/core/src/test/scala/org/apache/spark/storage/DiskBlockManagerSuite.scala
@@ -52,7 +52,7 @@ class DiskBlockManagerSuite extends FunSuite with BeforeAndAfterEach with Before
     rootDir0.deleteOnExit()
     rootDir1 = Files.createTempDir()
     rootDir1.deleteOnExit()
-    rootDirs = rootDir0.getName + "," + rootDir1.getName
+    rootDirs = rootDir0.getAbsolutePath + "," + rootDir1.getAbsolutePath
     println("Created root dirs: " + rootDirs)
   }