don't allow ExtrasFS for this test case

This commit is contained in:
Mike McCandless 2017-04-22 18:45:27 -04:00
parent a07ac63357
commit 487e085264
1 changed files with 3 additions and 1 deletions

View File

@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.lucene.store;
package org.apache.lucene.store;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
@ -26,6 +26,7 @@ import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import org.apache.lucene.mockfile.ExtrasFS;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase;
public class TestDirectory extends LuceneTestCase { public class TestDirectory extends LuceneTestCase {
@ -142,6 +143,7 @@ public class TestDirectory extends LuceneTestCase {
public void testListAll() throws Throwable { public void testListAll() throws Throwable {
Path dir = createTempDir("testdir"); Path dir = createTempDir("testdir");
assumeFalse("this test does not expect extra files", dir.getFileSystem().provider() instanceof ExtrasFS);
Path file1 = Files.createFile(dir.resolve("tempfile1")); Path file1 = Files.createFile(dir.resolve("tempfile1"));
Path file2 = Files.createFile(dir.resolve("tempfile2")); Path file2 = Files.createFile(dir.resolve("tempfile2"));
Set<String> files = new HashSet<>(Arrays.asList(FSDirectory.listAll(dir))); Set<String> files = new HashSet<>(Arrays.asList(FSDirectory.listAll(dir)));