lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r990854 - /lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
Date Mon, 30 Aug 2010 16:42:39 GMT
Author: mikemccand
Date: Mon Aug 30 16:42:38 2010
New Revision: 990854

URL: http://svn.apache.org/viewvc?rev=990854&view=rev
Log:
fix false random test failure

Modified:
    lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java

Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java?rev=990854&r1=990853&r2=990854&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
(original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
Mon Aug 30 16:42:38 2010
@@ -372,7 +372,6 @@ public class TestBackwardsCompatibility 
     Directory dir = FSDirectory.open(new File(dirName));
     // open writer
     IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(random, TEST_VERSION_CURRENT,
new MockAnalyzer()).setOpenMode(OpenMode.APPEND));
-
     // add 10 docs
     for(int i=0;i<10;i++) {
       addDoc(writer, 35+i);
@@ -381,11 +380,11 @@ public class TestBackwardsCompatibility 
     // make sure writer sees right total -- writer seems not to know about deletes in .del?
     final int expected;
     if (compare(origDirName, "24") < 0) {
-      expected = 45;
+      expected = 44;
     } else {
-      expected = 46;
+      expected = 45;
     }
-    assertEquals("wrong doc count", expected, writer.maxDoc());
+    assertEquals("wrong doc count", expected, writer.numDocs());
     writer.close();
 
     // make sure searching sees right # hits



Mime
View raw message