From 12f8b24dce2a6512338fb5a70a38d7530269003d Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Mon, 6 Jun 2005 22:43:28 +0000 Subject: [PATCH] rename test case class git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@185083 13f79535-47bb-0310-9956-ffa450edef68 --- .../{TestIndex.java => TestIndexModifier.java} | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) rename src/test/org/apache/lucene/index/{TestIndex.java => TestIndexModifier.java} (93%) diff --git a/src/test/org/apache/lucene/index/TestIndex.java b/src/test/org/apache/lucene/index/TestIndexModifier.java similarity index 93% rename from src/test/org/apache/lucene/index/TestIndex.java rename to src/test/org/apache/lucene/index/TestIndexModifier.java index 53224d7c74c..43fe42870d4 100644 --- a/src/test/org/apache/lucene/index/TestIndex.java +++ b/src/test/org/apache/lucene/index/TestIndexModifier.java @@ -38,7 +38,7 @@ import org.apache.lucene.store.RAMDirectory; * * @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 @@ public class TestIndex extends TestCase { 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 @@ public class TestIndex extends TestCase { 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();