[TEST] Skip counting ExtraFS files when asserting path is cleared

This commit is contained in:
Lee Hinman 2015-08-12 16:46:11 -06:00
parent b58970a3fe
commit ae7a73dc1c
1 changed files with 4 additions and 0 deletions

View File

@ -597,6 +597,10 @@ public abstract class ESTestCase extends LuceneTestCase {
if (Files.exists(path)) { if (Files.exists(path)) {
try (DirectoryStream<Path> stream = Files.newDirectoryStream(path)) { try (DirectoryStream<Path> stream = Files.newDirectoryStream(path)) {
for (Path file : stream) { for (Path file : stream) {
// Skip files added by Lucene's ExtraFS
if (file.getFileName().toString().startsWith("extra")) {
continue;
}
logger.info("--> found file: [{}]", file.toAbsolutePath().toString()); logger.info("--> found file: [{}]", file.toAbsolutePath().toString());
if (Files.isDirectory(file)) { if (Files.isDirectory(file)) {
assertPathHasBeenCleared(file); assertPathHasBeenCleared(file);