Class AbstractBlobContainerRetriesTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.repositories.blobstore.AbstractBlobContainerRetriesTestCase

public abstract class AbstractBlobContainerRetriesTestCase extends ESTestCase
  • Field Details

  • Constructor Details

    • AbstractBlobContainerRetriesTestCase

      public AbstractBlobContainerRetriesTestCase()
  • Method Details

    • setUp

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

      public void tearDown() throws Exception
      Overrides:
      tearDown in class org.apache.lucene.tests.util.LuceneTestCase
      Throws:
      Exception
    • downloadStorageEndpoint

      protected abstract String downloadStorageEndpoint(BlobContainer container, String blob)
    • bytesContentType

      protected abstract String bytesContentType()
    • unresponsiveExceptionType

      protected abstract Class<? extends Exception> unresponsiveExceptionType()
    • createBlobContainer

      protected abstract BlobContainer createBlobContainer(@Nullable Integer maxRetries, @Nullable org.elasticsearch.core.TimeValue readTimeout, @Nullable Boolean disableChunkedEncoding, @Nullable ByteSizeValue bufferSize)
    • readTimeoutExceptionMatcher

      protected org.hamcrest.Matcher<Object> readTimeoutExceptionMatcher()
    • testReadNonexistentBlobThrowsNoSuchFileException

      public void testReadNonexistentBlobThrowsNoSuchFileException()
    • testReadBlobWithRetries

      public void testReadBlobWithRetries() throws Exception
      Throws:
      Exception
    • testReadRangeBlobWithRetries

      public void testReadRangeBlobWithRetries() throws Exception
      Throws:
      Exception
    • testReadBlobWithReadTimeouts

      public void testReadBlobWithReadTimeouts()
    • getMaxRetriesMatcher

      protected org.hamcrest.Matcher<Integer> getMaxRetriesMatcher(int maxRetries)
    • testReadBlobWithNoHttpResponse

      public void testReadBlobWithNoHttpResponse()
    • testReadBlobWithPrematureConnectionClose

      public void testReadBlobWithPrematureConnectionClose()
    • randomBlobContent

      protected static byte[] randomBlobContent()
    • randomBlobContent

      protected static byte[] randomBlobContent(int minSize)
    • getRange

      protected static org.elasticsearch.core.Tuple<Long,Long> getRange(HttpExchange exchange)
    • getRangeStart

      protected static int getRangeStart(HttpExchange exchange)
    • getRangeEnd

      protected static OptionalInt getRangeEnd(HttpExchange exchange)
    • sendIncompleteContent

      protected int sendIncompleteContent(HttpExchange exchange, byte[] bytes) throws IOException
      Throws:
      IOException