Class ESMockAPIBasedRepositoryIntegTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase

@SuppressFileSystems({"WindowsFS","ExtrasFS"}) public abstract class ESMockAPIBasedRepositoryIntegTestCase extends ESBlobStoreRepositoryIntegTestCase
Integration tests for BlobStoreRepository implementations rely on mock APIs that emulate cloud-based services.
  • Field Details

  • Constructor Details

    • ESMockAPIBasedRepositoryIntegTestCase

      public ESMockAPIBasedRepositoryIntegTestCase()
  • Method Details

    • startHttpServer

      public static void startHttpServer() throws Exception
      Throws:
      Exception
    • setUpHttpServer

      public void setUpHttpServer()
    • stopHttpServer

      public static void stopHttpServer()
    • tearDownHttpServer

      public void tearDownHttpServer()
    • assertEmptyRepo

      protected void assertEmptyRepo(Map<String,BytesReference> blobsMap)
    • createHttpHandlers

      protected abstract Map<String,HttpHandler> createHttpHandlers()
    • createErroneousHttpHandler

      protected abstract HttpHandler createErroneousHttpHandler(HttpHandler delegate)
    • testSnapshotWithLargeSegmentFiles

      public final void testSnapshotWithLargeSegmentFiles() throws Exception
      Test the snapshot and restore of an index which has large segments files.
      Throws:
      Exception
    • testRequestStats

      public void testRequestStats() throws Exception
      Throws:
      Exception
    • getMockRequestCounts

      protected Map<String,Long> getMockRequestCounts()
    • httpServerUrl

      protected static String httpServerUrl()
    • serverUrl

      protected static String serverUrl()
    • drainInputStream

      protected static void drainInputStream(InputStream inputStream) throws IOException
      Consumes and closes the given InputStream
      Throws:
      IOException
    • wrap

      public static ESMockAPIBasedRepositoryIntegTestCase.DelegatingHttpHandler wrap(HttpHandler handler, org.apache.logging.log4j.Logger logger)
      Wrap a HttpHandler to log any thrown exception using the given Logger.