Class ESIndexInputTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.common.lucene.store.ESIndexInputTestCase

public class ESIndexInputTestCase extends ESTestCase
Test harness for verifying IndexInput implementations.
  • Constructor Details

    • ESIndexInputTestCase

      public ESIndexInputTestCase()
  • Method Details

    • createExecutor

      public static void createExecutor()
    • destroyExecutor

      public static void destroyExecutor()
    • setUp

      public void setUp() throws Exception
      Overrides:
      setUp in class org.apache.lucene.util.LuceneTestCase
      Throws:
      Exception
    • randomReadAndSlice

      protected byte[] randomReadAndSlice(org.apache.lucene.store.IndexInput indexInput, int length) throws IOException
      Reads the contents of an IndexInput from indexInput.getFilePointer() to length using a wide variety of different access methods. Returns an array of length length containing the bytes that were read starting at index indexInput.getFilePointer(). The bytes of the returned array with indices below the initial value of indexInput.getFilePointer() may contain anything. The final value of indexInput.getFilePointer() is length.
      Throws:
      IOException
    • randomFileExtension

      protected static String randomFileExtension()