lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1539722 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
Date Thu, 07 Nov 2013 17:14:57 GMT
Author: mikemccand
Date: Thu Nov  7 17:14:57 2013
New Revision: 1539722

URL: http://svn.apache.org/r1539722
Log:
fix test bug

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=1539722&r1=1539721&r2=1539722&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
Thu Nov  7 17:14:57 2013
@@ -1390,7 +1390,7 @@ public class TestIndexWriter extends Luc
         r = DirectoryReader.open(dir);
       }
 
-      List<String> files = Arrays.asList(dir.listAll());
+      List<String> files = new ArrayList<String>(Arrays.asList(dir.listAll()));
 
       assertTrue(files.contains("_0.cfs"));
       assertTrue(files.contains("_0.cfe"));
@@ -1402,6 +1402,9 @@ public class TestIndexWriter extends Luc
         assertEquals(files.toString(), files.size(), 5);
       } else {
         // this is an NRT reopen - no segments files yet
+
+        // RAMDir won't have a write.lock, but fs dirs will:
+        files.remove("write.lock");
         assertEquals(files.toString(), files.size(), 3);
       }
       w.addDocument(doc);



Mime
View raw message