Class BaseDirectoryTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase
org.apache.lucene.tests.store.BaseDirectoryTestCase
Direct Known Subclasses:
BaseChunkedDirectoryTestCase

public abstract class BaseDirectoryTestCase extends LuceneTestCase
Base class for Directory implementations.
  • Constructor Details

    • BaseDirectoryTestCase

      public BaseDirectoryTestCase()
  • Method Details

    • getDirectory

      protected abstract Directory getDirectory(Path path) throws IOException
      A subclass returns the Directory to be tested; if it's an FS-based directory it should point to the specified path, else it can ignore it.
      Throws:
      IOException
    • testCopyFrom

      public void testCopyFrom() throws Exception
      Throws:
      Exception
    • testRename

      public void testRename() throws Exception
      Throws:
      Exception
    • testDeleteFile

      public void testDeleteFile() throws Exception
      Throws:
      Exception
    • testByte

      public void testByte() throws Exception
      Throws:
      Exception
    • testShort

      public void testShort() throws Exception
      Throws:
      Exception
    • testInt

      public void testInt() throws Exception
      Throws:
      Exception
    • testLong

      public void testLong() throws Exception
      Throws:
      Exception
    • testAlignedLittleEndianLongs

      public void testAlignedLittleEndianLongs() throws Exception
      Throws:
      Exception
    • testUnalignedLittleEndianLongs

      public void testUnalignedLittleEndianLongs() throws Exception
      Throws:
      Exception
    • testLittleEndianLongsUnderflow

      public void testLittleEndianLongsUnderflow() throws Exception
      Throws:
      Exception
    • testAlignedFloats

      public void testAlignedFloats() throws Exception
      Throws:
      Exception
    • testUnalignedFloats

      public void testUnalignedFloats() throws Exception
      Throws:
      Exception
    • testFloatsUnderflow

      public void testFloatsUnderflow() throws Exception
      Throws:
      Exception
    • testString

      public void testString() throws Exception
      Throws:
      Exception
    • testVInt

      public void testVInt() throws Exception
      Throws:
      Exception
    • testVLong

      public void testVLong() throws Exception
      Throws:
      Exception
    • testZInt

      public void testZInt() throws Exception
      Throws:
      Exception
    • testZLong

      public void testZLong() throws Exception
      Throws:
      Exception
    • testSetOfStrings

      public void testSetOfStrings() throws Exception
      Throws:
      Exception
    • testMapOfStrings

      public void testMapOfStrings() throws Exception
      Throws:
      Exception
    • testChecksum

      public void testChecksum() throws Exception
      Throws:
      Exception
    • testDetectClose

      public void testDetectClose() throws Throwable
      Make sure directory throws AlreadyClosedException if you try to createOutput after closing.
      Throws:
      Throwable
    • testThreadSafetyInListAll

      public void testThreadSafetyInListAll() throws Exception
      Throws:
      Exception
    • testFileExistsInListAfterCreated

      public void testFileExistsInListAfterCreated() throws IOException
      LUCENE-1468: once we create an output, we should see it in the dir listing.
      Throws:
      IOException
    • testSeekToEOFThenBack

      public void testSeekToEOFThenBack() throws Exception
      Throws:
      Exception
    • testIllegalEOF

      public void testIllegalEOF() throws Exception
      Throws:
      Exception
    • testSeekPastEOF

      public void testSeekPastEOF() throws Exception
      Throws:
      Exception
    • testSliceOutOfBounds

      public void testSliceOutOfBounds() throws Exception
      Throws:
      Exception
    • testNoDir

      public void testNoDir() throws Throwable
      Throws:
      Throwable
    • testCopyBytes

      public void testCopyBytes() throws Exception
      Throws:
      Exception
    • testCopyBytesWithThreads

      public void testCopyBytesWithThreads() throws Exception
      Throws:
      Exception
    • testFsyncDoesntCreateNewFiles

      public void testFsyncDoesntCreateNewFiles() throws Exception
      Throws:
      Exception
    • testRandomLong

      public void testRandomLong() throws Exception
      Throws:
      Exception
    • testRandomInt

      public void testRandomInt() throws Exception
      Throws:
      Exception
    • testRandomShort

      public void testRandomShort() throws Exception
      Throws:
      Exception
    • testRandomByte

      public void testRandomByte() throws Exception
      Throws:
      Exception
    • testSliceOfSlice

      public void testSliceOfSlice() throws Exception
      try to stress slices of slices
      Throws:
      Exception
    • testLargeWrites

      public void testLargeWrites() throws IOException
      This test that writes larger than the size of the buffer output will correctly increment the file pointer.
      Throws:
      IOException
    • testIndexOutputToString

      public void testIndexOutputToString() throws Throwable
      Throws:
      Throwable
    • testDoubleCloseOutput

      public void testDoubleCloseOutput() throws Throwable
      Throws:
      Throwable
    • testDoubleCloseInput

      public void testDoubleCloseInput() throws Throwable
      Throws:
      Throwable
    • testCreateTempOutput

      public void testCreateTempOutput() throws Throwable
      Throws:
      Throwable
    • testCreateOutputForExistingFile

      public void testCreateOutputForExistingFile() throws IOException
      Throws:
      IOException
    • testSeekToEndOfFile

      public void testSeekToEndOfFile() throws IOException
      Throws:
      IOException
    • testSeekBeyondEndOfFile

      public void testSeekBeyondEndOfFile() throws IOException
      Throws:
      IOException
    • testPendingDeletions

      public void testPendingDeletions() throws IOException
      Throws:
      IOException
    • testListAllIsSorted

      public void testListAllIsSorted() throws IOException
      Throws:
      IOException