org.apache.lucene.index
Class BaseDocValuesFormatTestCase

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.lucene.util.LuceneTestCase
          extended by org.apache.lucene.index.BaseDocValuesFormatTestCase
Direct Known Subclasses:
BaseCompressingDocValuesFormatTestCase

public abstract class BaseDocValuesFormatTestCase
extends LuceneTestCase

Abstract class to do basic tests for a docvalues format. NOTE: This test focuses on the docvalues impl, nothing else. The [stretch] goal is for this test to be so thorough in testing a new DocValuesFormat that if this test passes, then all Lucene/Solr tests should also pass. Ie, if there is some bug in a given DocValuesFormat that this test fails to catch then this test needs to be improved!


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.util.LuceneTestCase
LuceneTestCase.AwaitsFix, LuceneTestCase.BadApple, LuceneTestCase.Nightly, LuceneTestCase.Slow, LuceneTestCase.SuppressCodecs, LuceneTestCase.Weekly
 
Field Summary
 
Fields inherited from class org.apache.lucene.util.LuceneTestCase
classRules, DEFAULT_LINE_DOCS_FILE, doesntSupportOffsets, INFOSTREAM, JENKINS_LARGE_LINE_DOCS_FILE, OLD_FORMAT_IMPERSONATION_IS_ACTIVE, PREFLEX_IMPERSONATION_IS_ACTIVE, RANDOM_MULTIPLIER, ruleChain, suiteFailureMarker, SYSPROP_AWAITSFIX, SYSPROP_BADAPPLES, SYSPROP_FAILFAST, SYSPROP_MAXFAILURES, SYSPROP_NIGHTLY, SYSPROP_SLOW, SYSPROP_WEEKLY, TEMP_DIR, TEST_AWAITSFIX, TEST_CODEC, TEST_DIRECTORY, TEST_DOCVALUESFORMAT, TEST_LINE_DOCS_FILE, TEST_NIGHTLY, TEST_POSTINGSFORMAT, TEST_SLOW, TEST_THROTTLING, TEST_VERSION_CURRENT, TEST_WEEKLY, VERBOSE
 
Constructor Summary
BaseDocValuesFormatTestCase()
           
 
Method Summary
protected  boolean codecAcceptsHugeBinaryValues(String field)
           
protected abstract  Codec getCodec()
          Returns the codec to run tests against
 void setUp()
          For subclasses to override.
 void tearDown()
          For subclasses to override.
 void testBigNumericRange()
           
 void testBigNumericRange2()
           
 void testBinaryFixedLengthVsStoredFields()
           
 void testBinaryVariableLengthVsStoredFields()
           
 void testBooleanNumericsVsStoredFields()
           
 void testByteMissingVsFieldCache()
           
 void testByteNumericsVsStoredFields()
           
 void testBytes()
           
 void testBytesTwoDocumentsMerged()
           
 void testBytesWithNewline()
           
 void testCodecUsesOwnBytes()
           
 void testCodecUsesOwnBytesEachTime()
           
 void testCodecUsesOwnSortedBytes()
           
 void testCodecUsesOwnSortedBytesEachTime()
           
 void testDocValuesSimple()
           
 void testEmptyBinaryValueOnPageSizes()
           
 void testEmptyBytes()
           
 void testEmptySortedBytes()
           
 void testGCDCompression()
           
 void testHugeBinaryValueLimit()
           
 void testHugeBinaryValues()
           
 void testIntMissingVsFieldCache()
           
 void testIntNumericsVsStoredFields()
           
 void testLongMissingVsFieldCache()
           
 void testLongNumericsVsStoredFields()
           
 void testMissingSortedBytes()
           
 void testOneFloat()
           
 void testOneNumber()
           
 void testRandomSortedBytes()
           
 void testShortMissingVsFieldCache()
           
 void testShortNumericsVsStoredFields()
           
 void testSortedBytes()
           
 void testSortedBytesThreeDocuments()
           
 void testSortedBytesTwoDocuments()
           
 void testSortedBytesTwoDocumentsMerged()
           
 void testSortedFixedLengthVsFieldCache()
           
 void testSortedFixedLengthVsStoredFields()
           
 void testSortedMergeAwayAllValues()
           
 void testSortedSetFixedLengthVsStoredFields()
           
 void testSortedSetFixedLengthVsUninvertedField()
           
 void testSortedSetMergeAwayAllValues()
           
 void testSortedSetOneValue()
           
 void testSortedSetTermsEnum()
           
 void testSortedSetThreeValuesTwoDocs()
           
 void testSortedSetTwoDocumentsFirstMissing()
           
 void testSortedSetTwoDocumentsFirstMissingMerge()
           
 void testSortedSetTwoDocumentsLastMissing()
           
 void testSortedSetTwoDocumentsLastMissingMerge()
           
 void testSortedSetTwoDocumentsMerged()
           
 void testSortedSetTwoFields()
           
 void testSortedSetTwoValues()
           
 void testSortedSetTwoValuesUnordered()
           
 void testSortedSetVariableLengthVsStoredFields()
           
 void testSortedSetVariableLengthVsUninvertedField()
           
 void testSortedTermsEnum()
           
 void testSortedVariableLengthVsFieldCache()
           
 void testSortedVariableLengthVsStoredFields()
           
 void testThreads()
          Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
 void testThreads2()
          Tests dv against stored fields with threads (all types + missing)
 void testThreeBytesOneMissingWithMerging()
           
 void testThreeFieldsMixed()
           
 void testThreeFieldsMixed2()
           
 void testThreeNumbersOneMissingWithMerging()
           
 void testTwoBytesOneMissing()
           
 void testTwoBytesOneMissingWithMerging()
           
 void testTwoDocumentsMerged()
           
 void testTwoDocumentsNumeric()
           
 void testTwoFieldsMixed()
           
 void testTwoNumbers()
           
 void testTwoNumbersOneMissing()
           
 void testTwoNumbersOneMissingWithMerging()
           
 void testVeryLargeButLegalBytes()
           
 void testVeryLargeButLegalSortedBytes()
           
 void testZeroOrMin()
           
 void testZeros()
           
 
Methods inherited from class org.apache.lucene.util.LuceneTestCase
assertDeletedDocsEquals, assertDocsAndPositionsEnumEquals, assertDocsEnumEquals, assertDocsSkippingEquals, assertDocValuesEquals, assertDocValuesEquals, assertFieldInfosEquals, assertFieldsEquals, assertFieldStatisticsEquals, assertNormsEquals, assertPositionsSkippingEquals, assertReaderEquals, assertReaderStatisticsEquals, assertSaneFieldCaches, assertStoredFieldEquals, assertStoredFieldsEquals, assertTermsEnumEquals, assertTermsEquals, assertTermsStatisticsEquals, assertTermStatsEquals, assertTermVectorsEquals, asSet, assumeFalse, assumeNoException, assumeTrue, atLeast, atLeast, closeAfterSuite, closeAfterTest, defaultCodecSupportsDocsWithField, defaultCodecSupportsDocValues, defaultCodecSupportsSortedSet, dumpArray, dumpIterator, getDataFile, getOnlySegmentReader, getTestClass, getTestName, isTestThread, localeForName, maybeWrapReader, newAlcoholicMergePolicy, newAlcoholicMergePolicy, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newIOContext, newIOContext, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newMergePolicy, newMergePolicy, newMockDirectory, newMockDirectory, newMockFSDirectory, newSearcher, newSearcher, newStringField, newStringField, newTextField, newTextField, newTieredMergePolicy, newTieredMergePolicy, random, randomLocale, randomTimeZone, rarely, rarely, replaceMaxFailureRule, 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, 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
 

Constructor Detail

BaseDocValuesFormatTestCase

public BaseDocValuesFormatTestCase()
Method Detail

getCodec

protected abstract Codec getCodec()
Returns the codec to run tests against


setUp

public void setUp()
           throws Exception
Description copied from class: LuceneTestCase
For subclasses to override. Overrides must call super.setUp().

Overrides:
setUp in class LuceneTestCase
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Description copied from class: LuceneTestCase
For subclasses to override. Overrides must call super.tearDown().

Overrides:
tearDown in class LuceneTestCase
Throws:
Exception

testOneNumber

public void testOneNumber()
                   throws IOException
Throws:
IOException

testOneFloat

public void testOneFloat()
                  throws IOException
Throws:
IOException

testTwoNumbers

public void testTwoNumbers()
                    throws IOException
Throws:
IOException

testTwoFieldsMixed

public void testTwoFieldsMixed()
                        throws IOException
Throws:
IOException

testThreeFieldsMixed

public void testThreeFieldsMixed()
                          throws IOException
Throws:
IOException

testThreeFieldsMixed2

public void testThreeFieldsMixed2()
                           throws IOException
Throws:
IOException

testTwoDocumentsNumeric

public void testTwoDocumentsNumeric()
                             throws IOException
Throws:
IOException

testTwoDocumentsMerged

public void testTwoDocumentsMerged()
                            throws IOException
Throws:
IOException

testBigNumericRange

public void testBigNumericRange()
                         throws IOException
Throws:
IOException

testBigNumericRange2

public void testBigNumericRange2()
                          throws IOException
Throws:
IOException

testBytes

public void testBytes()
               throws IOException
Throws:
IOException

testBytesTwoDocumentsMerged

public void testBytesTwoDocumentsMerged()
                                 throws IOException
Throws:
IOException

testSortedBytes

public void testSortedBytes()
                     throws IOException
Throws:
IOException

testSortedBytesTwoDocuments

public void testSortedBytesTwoDocuments()
                                 throws IOException
Throws:
IOException

testSortedBytesThreeDocuments

public void testSortedBytesThreeDocuments()
                                   throws IOException
Throws:
IOException

testSortedBytesTwoDocumentsMerged

public void testSortedBytesTwoDocumentsMerged()
                                       throws IOException
Throws:
IOException

testSortedMergeAwayAllValues

public void testSortedMergeAwayAllValues()
                                  throws IOException
Throws:
IOException

testBytesWithNewline

public void testBytesWithNewline()
                          throws IOException
Throws:
IOException

testMissingSortedBytes

public void testMissingSortedBytes()
                            throws IOException
Throws:
IOException

testSortedTermsEnum

public void testSortedTermsEnum()
                         throws IOException
Throws:
IOException

testEmptySortedBytes

public void testEmptySortedBytes()
                          throws IOException
Throws:
IOException

testEmptyBytes

public void testEmptyBytes()
                    throws IOException
Throws:
IOException

testVeryLargeButLegalBytes

public void testVeryLargeButLegalBytes()
                                throws IOException
Throws:
IOException

testVeryLargeButLegalSortedBytes

public void testVeryLargeButLegalSortedBytes()
                                      throws IOException
Throws:
IOException

testCodecUsesOwnBytes

public void testCodecUsesOwnBytes()
                           throws IOException
Throws:
IOException

testCodecUsesOwnSortedBytes

public void testCodecUsesOwnSortedBytes()
                                 throws IOException
Throws:
IOException

testCodecUsesOwnBytesEachTime

public void testCodecUsesOwnBytesEachTime()
                                   throws IOException
Throws:
IOException

testCodecUsesOwnSortedBytesEachTime

public void testCodecUsesOwnSortedBytesEachTime()
                                         throws IOException
Throws:
IOException

testDocValuesSimple

public void testDocValuesSimple()
                         throws IOException
Throws:
IOException

testRandomSortedBytes

public void testRandomSortedBytes()
                           throws IOException
Throws:
IOException

testBooleanNumericsVsStoredFields

public void testBooleanNumericsVsStoredFields()
                                       throws Exception
Throws:
Exception

testByteNumericsVsStoredFields

public void testByteNumericsVsStoredFields()
                                    throws Exception
Throws:
Exception

testByteMissingVsFieldCache

public void testByteMissingVsFieldCache()
                                 throws Exception
Throws:
Exception

testShortNumericsVsStoredFields

public void testShortNumericsVsStoredFields()
                                     throws Exception
Throws:
Exception

testShortMissingVsFieldCache

public void testShortMissingVsFieldCache()
                                  throws Exception
Throws:
Exception

testIntNumericsVsStoredFields

public void testIntNumericsVsStoredFields()
                                   throws Exception
Throws:
Exception

testIntMissingVsFieldCache

public void testIntMissingVsFieldCache()
                                throws Exception
Throws:
Exception

testLongNumericsVsStoredFields

public void testLongNumericsVsStoredFields()
                                    throws Exception
Throws:
Exception

testLongMissingVsFieldCache

public void testLongMissingVsFieldCache()
                                 throws Exception
Throws:
Exception

testBinaryFixedLengthVsStoredFields

public void testBinaryFixedLengthVsStoredFields()
                                         throws Exception
Throws:
Exception

testBinaryVariableLengthVsStoredFields

public void testBinaryVariableLengthVsStoredFields()
                                            throws Exception
Throws:
Exception

testSortedFixedLengthVsStoredFields

public void testSortedFixedLengthVsStoredFields()
                                         throws Exception
Throws:
Exception

testSortedFixedLengthVsFieldCache

public void testSortedFixedLengthVsFieldCache()
                                       throws Exception
Throws:
Exception

testSortedVariableLengthVsFieldCache

public void testSortedVariableLengthVsFieldCache()
                                          throws Exception
Throws:
Exception

testSortedVariableLengthVsStoredFields

public void testSortedVariableLengthVsStoredFields()
                                            throws Exception
Throws:
Exception

testSortedSetOneValue

public void testSortedSetOneValue()
                           throws IOException
Throws:
IOException

testSortedSetTwoFields

public void testSortedSetTwoFields()
                            throws IOException
Throws:
IOException

testSortedSetTwoDocumentsMerged

public void testSortedSetTwoDocumentsMerged()
                                     throws IOException
Throws:
IOException

testSortedSetTwoValues

public void testSortedSetTwoValues()
                            throws IOException
Throws:
IOException

testSortedSetTwoValuesUnordered

public void testSortedSetTwoValuesUnordered()
                                     throws IOException
Throws:
IOException

testSortedSetThreeValuesTwoDocs

public void testSortedSetThreeValuesTwoDocs()
                                     throws IOException
Throws:
IOException

testSortedSetTwoDocumentsLastMissing

public void testSortedSetTwoDocumentsLastMissing()
                                          throws IOException
Throws:
IOException

testSortedSetTwoDocumentsLastMissingMerge

public void testSortedSetTwoDocumentsLastMissingMerge()
                                               throws IOException
Throws:
IOException

testSortedSetTwoDocumentsFirstMissing

public void testSortedSetTwoDocumentsFirstMissing()
                                           throws IOException
Throws:
IOException

testSortedSetTwoDocumentsFirstMissingMerge

public void testSortedSetTwoDocumentsFirstMissingMerge()
                                                throws IOException
Throws:
IOException

testSortedSetMergeAwayAllValues

public void testSortedSetMergeAwayAllValues()
                                     throws IOException
Throws:
IOException

testSortedSetTermsEnum

public void testSortedSetTermsEnum()
                            throws IOException
Throws:
IOException

testSortedSetFixedLengthVsStoredFields

public void testSortedSetFixedLengthVsStoredFields()
                                            throws Exception
Throws:
Exception

testSortedSetVariableLengthVsStoredFields

public void testSortedSetVariableLengthVsStoredFields()
                                               throws Exception
Throws:
Exception

testSortedSetFixedLengthVsUninvertedField

public void testSortedSetFixedLengthVsUninvertedField()
                                               throws Exception
Throws:
Exception

testSortedSetVariableLengthVsUninvertedField

public void testSortedSetVariableLengthVsUninvertedField()
                                                  throws Exception
Throws:
Exception

testGCDCompression

public void testGCDCompression()
                        throws Exception
Throws:
Exception

testZeros

public void testZeros()
               throws Exception
Throws:
Exception

testZeroOrMin

public void testZeroOrMin()
                   throws Exception
Throws:
Exception

testTwoNumbersOneMissing

public void testTwoNumbersOneMissing()
                              throws IOException
Throws:
IOException

testTwoNumbersOneMissingWithMerging

public void testTwoNumbersOneMissingWithMerging()
                                         throws IOException
Throws:
IOException

testThreeNumbersOneMissingWithMerging

public void testThreeNumbersOneMissingWithMerging()
                                           throws IOException
Throws:
IOException

testTwoBytesOneMissing

public void testTwoBytesOneMissing()
                            throws IOException
Throws:
IOException

testTwoBytesOneMissingWithMerging

public void testTwoBytesOneMissingWithMerging()
                                       throws IOException
Throws:
IOException

testThreeBytesOneMissingWithMerging

public void testThreeBytesOneMissingWithMerging()
                                         throws IOException
Throws:
IOException

testHugeBinaryValues

public void testHugeBinaryValues()
                          throws Exception
Throws:
Exception

testHugeBinaryValueLimit

public void testHugeBinaryValueLimit()
                              throws Exception
Throws:
Exception

testThreads

public void testThreads()
                 throws Exception
Tests dv against stored fields with threads (binary/numeric/sorted, no missing)

Throws:
Exception

testThreads2

public void testThreads2()
                  throws Exception
Tests dv against stored fields with threads (all types + missing)

Throws:
Exception

testEmptyBinaryValueOnPageSizes

public void testEmptyBinaryValueOnPageSizes()
                                     throws Exception
Throws:
Exception

codecAcceptsHugeBinaryValues

protected boolean codecAcceptsHugeBinaryValues(String field)


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.