Class ESBlobStoreRepositoryIntegTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.test.ESIntegTestCase
org.elasticsearch.repositories.blobstore.ESBlobStoreRepositoryIntegTestCase
Direct Known Subclasses:
ESFsBasedRepositoryIntegTestCase, ESMockAPIBasedRepositoryIntegTestCase

public abstract class ESBlobStoreRepositoryIntegTestCase extends ESIntegTestCase
Integration tests for BlobStoreRepository implementations.
  • Constructor Details

    • ESBlobStoreRepositoryIntegTestCase

      public ESBlobStoreRepositoryIntegTestCase()
  • Method Details

    • getRepositoryData

      public static org.elasticsearch.repositories.RepositoryData getRepositoryData(org.elasticsearch.repositories.Repository repository)
    • repositoryType

      protected abstract String repositoryType()
    • repositorySettings

      protected org.elasticsearch.common.settings.Settings repositorySettings(String repoName)
    • createRepository

      protected final String createRepository(String name)
    • createRepository

      protected final String createRepository(String name, boolean verify)
    • createRepository

      protected final String createRepository(String name, org.elasticsearch.common.settings.Settings settings, boolean verify)
    • deleteRepository

      protected final void deleteRepository(String name)
    • testReadNonExistingPath

      public void testReadNonExistingPath() throws IOException
      Throws:
      IOException
    • testWriteRead

      public void testWriteRead() throws IOException
      Throws:
      IOException
    • testList

      public void testList() throws IOException
      Throws:
      IOException
    • testDeleteBlobs

      public void testDeleteBlobs() throws IOException
      Throws:
      IOException
    • writeBlob

      public static void writeBlob(org.elasticsearch.common.blobstore.BlobContainer container, String blobName, org.elasticsearch.common.bytes.BytesArray bytesArray, boolean failIfAlreadyExists) throws IOException
      Throws:
      IOException
    • testContainerCreationAndDeletion

      public void testContainerCreationAndDeletion() throws IOException
      Throws:
      IOException
    • writeRandomBlob

      public static byte[] writeRandomBlob(org.elasticsearch.common.blobstore.BlobContainer container, String name, int length) throws IOException
      Throws:
      IOException
    • readBlobFully

      public static byte[] readBlobFully(org.elasticsearch.common.blobstore.BlobContainer container, String name, int length) throws IOException
      Throws:
      IOException
    • randomBytes

      public static byte[] randomBytes(int length)
    • writeBlob

      protected static void writeBlob(org.elasticsearch.common.blobstore.BlobContainer container, String blobName, org.elasticsearch.common.bytes.BytesArray bytesArray) throws IOException
      Throws:
      IOException
    • newBlobStore

      protected org.elasticsearch.common.blobstore.BlobStore newBlobStore()
    • newBlobStore

      protected org.elasticsearch.common.blobstore.BlobStore newBlobStore(String repository)
    • testSnapshotAndRestore

      public void testSnapshotAndRestore() throws Exception
      Throws:
      Exception
    • testSnapshotAndRestore

      protected void testSnapshotAndRestore(boolean recreateRepositoryBeforeRestore) throws Exception
      Throws:
      Exception
    • testMultipleSnapshotAndRollback

      public void testMultipleSnapshotAndRollback() throws Exception
      Throws:
      Exception
    • testIndicesDeletedFromRepository

      public void testIndicesDeletedFromRepository() throws Exception
      Throws:
      Exception
    • addRandomDocuments

      protected void addRandomDocuments(String name, int numDocs) throws InterruptedException
      Throws:
      InterruptedException
    • assertSuccessfulSnapshot

      protected static void assertSuccessfulSnapshot(org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder requestBuilder)
    • assertSuccessfulRestore

      protected static void assertSuccessfulRestore(org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequestBuilder requestBuilder)
    • randomName

      protected String randomName()
    • randomRepositoryName

      protected String randomRepositoryName()
    • blobLengthFromContentLength

      protected long blobLengthFromContentLength(long contentLength)