33
33
import static org .opensearch .node .remotestore .RemoteStoreNodeAttribute .REMOTE_STORE_REPOSITORY_TYPE_ATTRIBUTE_KEY_FORMAT ;
34
34
import static org .opensearch .node .remotestore .RemoteStoreNodeAttribute .REMOTE_STORE_SEGMENT_REPOSITORY_NAME_ATTRIBUTE_KEY ;
35
35
import static org .opensearch .node .remotestore .RemoteStoreNodeAttribute .REMOTE_STORE_TRANSLOG_REPOSITORY_NAME_ATTRIBUTE_KEY ;
36
- import static org .opensearch .test .hamcrest .OpenSearchAssertions .assertAcked ;
37
36
38
37
public abstract class AbstractRemoteStoreMockRepositoryIntegTestCase extends AbstractSnapshotIntegTestCase {
39
38
@@ -107,13 +106,11 @@ public Settings buildRemoteStoreNodeAttributes(Path repoLocation, double ioFailu
107
106
.build ();
108
107
}
109
108
110
- protected void deleteRepo () {
111
- logger .info ("--> Deleting all the indices" );
112
- internalCluster ().wipeIndices ("_all" );
113
- logger .info ("--> Deleting the repository={}" , REPOSITORY_NAME );
114
- assertAcked (clusterAdmin ().prepareDeleteRepository (REPOSITORY_NAME ));
115
- logger .info ("--> Deleting the repository={}" , TRANSLOG_REPOSITORY_NAME );
116
- assertAcked (clusterAdmin ().prepareDeleteRepository (TRANSLOG_REPOSITORY_NAME ));
109
+ protected void cleanupRepo () {
110
+ logger .info ("--> Cleanup the repository={}" , REPOSITORY_NAME );
111
+ clusterAdmin ().prepareCleanupRepository (REPOSITORY_NAME ).execute ().actionGet ();
112
+ logger .info ("--> Cleanup the repository={}" , TRANSLOG_REPOSITORY_NAME );
113
+ clusterAdmin ().prepareCleanupRepository (TRANSLOG_REPOSITORY_NAME ).execute ().actionGet ();
117
114
}
118
115
119
116
protected String setup (Path repoLocation , double ioFailureRate , String skipExceptionBlobList , long maxFailure ) {
@@ -127,6 +124,8 @@ protected String setup(Path repoLocation, double ioFailureRate, String skipExcep
127
124
settings .put (CLUSTER_REPLICATION_TYPE_SETTING .getKey (), ReplicationType .SEGMENT );
128
125
}
129
126
127
+ disableRepoConsistencyCheck ("Remote Store Creates System Repository" );
128
+
130
129
internalCluster ().startClusterManagerOnlyNode (settings .build ());
131
130
String dataNodeName = internalCluster ().startDataOnlyNode (settings .build ());
132
131
createIndex (INDEX_NAME );
0 commit comments