diff --git a/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreTests.java b/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreTests.java index 38bf42c0f3f..439a9d567f1 100644 --- a/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreTests.java +++ b/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreTests.java @@ -23,7 +23,6 @@ package org.elasticsearch.repositories.azure; import com.carrotsearch.randomizedtesting.RandomizedTest; import com.microsoft.azure.storage.LocationMode; import com.microsoft.azure.storage.StorageException; -import org.apache.lucene.util.LuceneTestCase.AwaitsFix; import org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryResponse; import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse; @@ -72,17 +71,16 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; supportsDedicatedMasters = false, numDataNodes = 1, transportClientRatio = 0.0) @ThirdParty -@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/26812") public class AzureSnapshotRestoreTests extends ESBlobStoreRepositoryIntegTestCase { private static Settings.Builder generateMockSettings() { return Settings.builder().setSecureSettings(generateMockSecureSettings()); } - // disabled for https://github.com/elastic/elasticsearch/issues/26812 - private static final AzureStorageService azureStorageService = null; - //private static final AzureStorageService azureStorageService = new AzureStorageServiceImpl(generateMockSettings().build(), - // AzureStorageSettings.load(generateMockSettings().build())); + private static AzureStorageService getAzureStorageService() { + return new AzureStorageServiceImpl(generateMockSettings().build(), + AzureStorageSettings.load(generateMockSettings().build())); + } @Override protected Settings nodeSettings(int nodeOrdinal) { @@ -125,7 +123,7 @@ public class AzureSnapshotRestoreTests extends ESBlobStoreRepositoryIntegTestCas // It could happen that we run this test really close to a previous one // so we might need some time to be able to create the container assertBusy(() -> { - azureStorageService.createContainer("default", LocationMode.PRIMARY_ONLY, containerName); + getAzureStorageService().createContainer("default", LocationMode.PRIMARY_ONLY, containerName); }, 30, TimeUnit.SECONDS); } @@ -134,7 +132,7 @@ public class AzureSnapshotRestoreTests extends ESBlobStoreRepositoryIntegTestCas * @param containerName container name to use */ private static void removeTestContainer(String containerName) throws URISyntaxException, StorageException { - azureStorageService.removeContainer("default", LocationMode.PRIMARY_ONLY, containerName); + getAzureStorageService().removeContainer("default", LocationMode.PRIMARY_ONLY, containerName); } @Override