From ea0ad3ec517d6d0944647ac497dbc014e6cac448 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Wed, 17 Jun 2020 09:35:38 +0200 Subject: [PATCH] LUCENE-9359: Avoid test failures when the extra file is a dir. --- .../src/test/org/apache/lucene/index/TestSegmentInfos.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestSegmentInfos.java b/lucene/core/src/test/org/apache/lucene/index/TestSegmentInfos.java index 1d6a4f44ece..4570f090600 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestSegmentInfos.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestSegmentInfos.java @@ -19,6 +19,7 @@ package org.apache.lucene.index; import org.apache.lucene.codecs.Codec; import org.apache.lucene.codecs.CodecUtil; +import org.apache.lucene.mockfile.ExtrasFS; import org.apache.lucene.search.Sort; import org.apache.lucene.store.BaseDirectoryWrapper; import org.apache.lucene.store.Directory; @@ -230,7 +231,7 @@ public class TestSegmentInfos extends LuceneTestCase { // ok } corrupt = true; - } else if (slowFileExists(corruptDir, file) == false) { // extraFS + } else if (ExtrasFS.isExtra(file) == false) { corruptDir.copyFrom(dir, file, file, IOContext.DEFAULT); } }