rename test case class

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@185083 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2005-06-06 22:43:28 +00:00
parent e2a79a145f
commit 12f8b24dce
1 changed files with 16 additions and 2 deletions

View File

@ -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();