[TEST] fix extrasFS file filtering in OldIndexUtils

This commit is contained in:
Simon Willnauer 2016-11-02 09:30:49 +01:00
parent 4db1ac931f
commit 2ba4dadea0
2 changed files with 2 additions and 2 deletions

View File

@ -1825,7 +1825,7 @@ public class InternalEngineTests extends ESTestCase {
assertEquals(Arrays.toString(tlogFiles), tlogFiles.length, 2); // ckp & tlog
Path tlogFile = tlogFiles[0].getFileName().toString().endsWith("tlog") ? tlogFiles[0] : tlogFiles[1];
final long size = Files.size(tlogFile);
logger.info("upgrading index {} file: {} size: {}", indexName, tlogFiles[0].getFileName(), size);
logger.debug("upgrading index {} file: {} size: {}", indexName, tlogFiles[0].getFileName(), size);
Directory directory = newFSDirectory(src.resolve("0").resolve("index"));
Store store = createStore(directory);
final int iters = randomIntBetween(0, 2);

View File

@ -125,7 +125,7 @@ public class OldIndexUtils {
} else {
final List<Path> indexFolders = new ArrayList<>();
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dataDir.resolve("0/indices"),
(p) -> p.getFileName().startsWith("extra") == false)) { // extra FS can break this...
(p) -> p.getFileName().toString().startsWith("extra") == false)) { // extra FS can break this...
for (final Path path : stream) {
indexFolders.add(path);
}