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

[1/2] lucene-solr:branch_7x: LUCENE-8324: Make test pass with ExtraFS.

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 91b28132f -> 9a560563d
  refs/heads/master b1613e4da -> f8ae14405


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/9a560563
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9a560563
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9a560563

Branch: refs/heads/branch_7x
Commit: 9a560563d8f8fb68e71ddba313f974b8bc345643
Parents: 91b2813
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:40:54 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/9a560563/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 7300c8a..6db7e86 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
@@ -3347,9 +3347,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 {


[2/2] lucene-solr:master: LUCENE-8324: Make test pass with ExtraFS.

Posted by jp...@apache.org.
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/master
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 {