diff --git a/src/test/org/apache/lucene/index/TestAtomicUpdate.java b/src/test/org/apache/lucene/index/TestAtomicUpdate.java index f23289a66d6..ba060875038 100644 --- a/src/test/org/apache/lucene/index/TestAtomicUpdate.java +++ b/src/test/org/apache/lucene/index/TestAtomicUpdate.java @@ -188,8 +188,7 @@ public class TestAtomicUpdate extends LuceneTestCase { directory.close(); // Second in an FSDirectory: - String tempDir = System.getProperty("java.io.tmpdir"); - File dirPath = new File(tempDir, "lucene.test.atomic"); + File dirPath = _TestUtil.getTempDir("lucene.test.atomic"); directory = FSDirectory.open(dirPath); runTest(directory); directory.close();