From 2ef79962a7cfb7c9c7a4fd1d23d71679d64350ec Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sat, 21 Feb 2015 05:36:33 +0000 Subject: [PATCH] LUCENE-6265: fix test bug git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1661286 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/index/TestIndexWriterOutOfFileDescriptors.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfFileDescriptors.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfFileDescriptors.java index 4431530bd9c..fa821cdb582 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfFileDescriptors.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfFileDescriptors.java @@ -135,8 +135,10 @@ public class TestIndexWriterOutOfFileDescriptors extends LuceneTestCase { dirCopy = newMockFSDirectory(createTempDir("TestIndexWriterOutOfFileDescriptors.copy")); Set files = new HashSet<>(); for (String file : dir.listAll()) { - dirCopy.copyFrom(dir, file, file, IOContext.DEFAULT); - files.add(file); + if (file.startsWith(IndexFileNames.SEGMENTS) || IndexFileNames.CODEC_FILE_PATTERN.matcher(file).matches()) { + dirCopy.copyFrom(dir, file, file, IOContext.DEFAULT); + files.add(file); + } } dirCopy.sync(files); // Have IW kiss the dir so we remove any leftover