fix SnapshotDeletionPolicy to remove the test dir if present to prevent false failures

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@764579 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-04-13 19:35:32 +00:00
parent ad79d914e4
commit 6cab0952aa
1 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,8 @@ public class TestSnapshotDeletionPolicy extends LuceneTestCase
public void testSnapshotDeletionPolicy() throws Exception {
File dir = new File(System.getProperty("tempDir"), INDEX_PATH);
try {
// Sometimes past test leaves the dir
_TestUtil.rmDir(dir);
Directory fsDir = FSDirectory.getDirectory(dir);
runTest(fsDir);
fsDir.close();