You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2018/05/28 15:40:13 UTC

[30/35] lucene-solr:jira/solr-11779: LUCENE-8324: Make test pass with ExtraFS.

LUCENE-8324: Make test pass with ExtraFS.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f8ae1440
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f8ae1440
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f8ae1440

Branch: refs/heads/jira/solr-11779
Commit: f8ae144054b67cc65be655e5fb95391cfab26362
Parents: b1613e4
Author: Adrien Grand <jp...@gmail.com>
Authored: Mon May 28 15:40:54 2018 +0200
Committer: Adrien Grand <jp...@gmail.com>
Committed: Mon May 28 15:41:17 2018 +0200

----------------------------------------------------------------------
 .../core/src/test/org/apache/lucene/index/TestIndexWriter.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f8ae1440/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
index ad3e379..5e394d5 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
@@ -3324,9 +3324,9 @@ public class TestIndexWriter extends LuceneTestCase {
         .filter(filter).collect(Collectors.toSet());
     Set<String> dirFiles = new HashSet<>(Arrays.asList(writer.getDirectory().listAll()))
         .stream().filter(filter).collect(Collectors.toSet());
-    Set<String> s = new HashSet<>(segFiles);
-    s.removeAll(dirFiles);
-    assertEquals(segFiles.toString() + " vs "+ dirFiles.toString(), segFiles.size(), dirFiles.size());
+    // ExtraFS might add an extra0 file, ignore it
+    dirFiles.remove("extra0");
+    assertEquals(segFiles.size(), dirFiles.size());
   }
 
   public void testFullyDeletedSegmentsReleaseFiles() throws IOException {