2016-10-05 3 views
1

ユニットテストを実行できません。下の@Afterがなければ、私はIndexAlreadyExistsExceptionを取得します。以下のコードでは、データディレクトリを削除できないというIOExceptionが発生します。テスト実行の間にこのディレクトリを手動で削除すると動作します。私はElasticsearchの新しいです、私は何ができますか?JUNITテスト間でElasticsearchデータフォルダを削除できません

@After 
public void testCompleted() throws IllegalAccessException, NoSuchMethodException, INvocationTargetExcaption, IOException 
{ 
    File testFile = new File("target/elasticsearch/data"); 
    FileUtils.deleteDiretory(testFile); 
} 

答えて

関連する問題