lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject svn commit: r185083 - /lucene/java/trunk/src/test/org/apache/lucene/index/TestIndex.java /lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexModifier.java
Date Mon, 06 Jun 2005 22:43:29 GMT
Author: dnaber
Date: Mon Jun  6 15:43:28 2005
New Revision: 185083

URL: http://svn.apache.org/viewcvs?rev=185083&view=rev
Log:
rename test case class

Added:
    lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexModifier.java
      - copied, changed from r185069, lucene/java/trunk/src/test/org/apache/lucene/index/TestIndex.java
Removed:
    lucene/java/trunk/src/test/org/apache/lucene/index/TestIndex.java

Copied: lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexModifier.java (from r185069,
lucene/java/trunk/src/test/org/apache/lucene/index/TestIndex.java)
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexModifier.java?p2=lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexModifier.java&p1=lucene/java/trunk/src/test/org/apache/lucene/index/TestIndex.java&r1=185069&r2=185083&rev=185083&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/index/TestIndex.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexModifier.java Mon Jun  6 15:43:28
2005
@@ -38,7 +38,7 @@
  * 
  * @author Daniel Naber
  */
-public class TestIndex extends TestCase {
+public class TestIndexModifier extends TestCase {
 
   private final int ITERATIONS = 500;		// iterations of thread test
 
@@ -76,6 +76,7 @@
     assertEquals(10, i.getMaxBufferedDocs());
     assertEquals(10000, i.getMaxFieldLength());
     assertEquals(10, i.getMergeFactor());
+    // test setting properties:
     i.setMaxBufferedDocs(100);
     i.setMergeFactor(25);
     i.setMaxFieldLength(250000);
@@ -86,7 +87,20 @@
     assertEquals(25, i.getMergeFactor());
     assertEquals(250000, i.getMaxFieldLength());
     assertFalse(i.getUseCompoundFile());
-    
+
+    // test setting properties when internally the reader is opened:
+    i.delete(allDocTerm);
+    i.setMaxBufferedDocs(100);
+    i.setMergeFactor(25);
+    i.setMaxFieldLength(250000);
+    i.addDocument(getDoc());
+    i.setUseCompoundFile(false);
+    i.optimize();
+    assertEquals(100, i.getMaxBufferedDocs());
+    assertEquals(25, i.getMergeFactor());
+    assertEquals(250000, i.getMaxFieldLength());
+    assertFalse(i.getUseCompoundFile());
+
     i.close();
     try {
       i.docCount();



Mime
View raw message