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()
    • randomReadAndSlice

      protected byte[] randomReadAndSlice​(org.apache.lucene.store.IndexInput indexInput, int length) throws java.io.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:
      java.io.IOException
    • randomFileExtension

      protected static java.lang.String randomFileExtension()