org.apache.lucene.index
Class ThreadedIndexingAndSearchingTestCase
java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase
public abstract class ThreadedIndexingAndSearchingTestCase
- extends LuceneTestCase
Utility class that spawns multiple indexing and
searching threads.
Fields inherited from class org.apache.lucene.util.LuceneTestCase |
intercept, random, RANDOM_MULTIPLIER, setTestThread, stores, TEMP_DIR, TEST_CLEAN_THREADS, TEST_DIRECTORY, TEST_ITER, TEST_ITER_MIN, TEST_LINE_DOCS_FILE, TEST_LOCALE, TEST_NIGHTLY, TEST_SEED, TEST_TIMEZONE, TEST_VERSION_CURRENT, testsFailed, VERBOSE |
Methods inherited from class org.apache.lucene.util.LuceneTestCase |
afterClassLuceneTestCaseJ4, alwaysIgnoredTestMethod, assertEquals, assertEquals, assertEquals, assertEquals, assertSaneFieldCaches, assumeFalse, assumeNoException, assumeTrue, atLeast, atLeast, beforeClassLuceneTestCaseJ4, dumpArray, dumpIterator, getDataFile, getName, getTestLabel, isTestThread, localeForName, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newField, newField, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newSearcher, newSearcher, newTieredMergePolicy, newTieredMergePolicy, purgeFieldCache, randomDirectory, randomLocale, randomTimeZone, rarely, rarely, reportAdditionalFailureInfo, reportPartialFailureInfo, setMergeFactor, setUp, setUseCompoundFile, tearDown, usually, usually |
Methods inherited from class org.junit.Assert |
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
failed
protected final AtomicBoolean failed
addCount
protected final AtomicInteger addCount
delCount
protected final AtomicInteger delCount
packCount
protected final AtomicInteger packCount
dir
protected org.apache.lucene.store.Directory dir
writer
protected org.apache.lucene.index.IndexWriter writer
ThreadedIndexingAndSearchingTestCase
public ThreadedIndexingAndSearchingTestCase()
getCurrentSearcher
protected abstract org.apache.lucene.search.IndexSearcher getCurrentSearcher()
throws Exception
- Throws:
Exception
getFinalSearcher
protected abstract org.apache.lucene.search.IndexSearcher getFinalSearcher()
throws Exception
- Throws:
Exception
releaseSearcher
protected void releaseSearcher(org.apache.lucene.search.IndexSearcher s)
throws Exception
- Throws:
Exception
doSearching
protected abstract void doSearching(ExecutorService es,
long stopTime)
throws Exception
- Throws:
Exception
getDirectory
protected org.apache.lucene.store.Directory getDirectory(org.apache.lucene.store.Directory in)
updateDocuments
protected void updateDocuments(org.apache.lucene.index.Term id,
Collection<org.apache.lucene.document.Document> docs)
throws Exception
- Throws:
Exception
addDocuments
protected void addDocuments(org.apache.lucene.index.Term id,
Collection<org.apache.lucene.document.Document> docs)
throws Exception
- Throws:
Exception
addDocument
protected void addDocument(org.apache.lucene.index.Term id,
org.apache.lucene.document.Document doc)
throws Exception
- Throws:
Exception
updateDocument
protected void updateDocument(org.apache.lucene.index.Term term,
org.apache.lucene.document.Document doc)
throws Exception
- Throws:
Exception
deleteDocuments
protected void deleteDocuments(org.apache.lucene.index.Term term)
throws Exception
- Throws:
Exception
doAfterIndexingThreadDone
protected void doAfterIndexingThreadDone()
runSearchThreads
protected void runSearchThreads(long stopTimeMS)
throws Exception
- Throws:
Exception
doAfterWriter
protected void doAfterWriter(ExecutorService es)
throws Exception
- Throws:
Exception
doClose
protected void doClose()
throws Exception
- Throws:
Exception
runTest
public void runTest(String testName)
throws Exception
- Throws:
Exception
smokeTestSearcher
protected void smokeTestSearcher(org.apache.lucene.search.IndexSearcher s)
throws Exception
- Throws:
Exception
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.