diff --git a/buildSrc/src/main/resources/checkstyle_suppressions.xml b/buildSrc/src/main/resources/checkstyle_suppressions.xml
index c3956ca9d40a7..73c41148a03d4 100644
--- a/buildSrc/src/main/resources/checkstyle_suppressions.xml
+++ b/buildSrc/src/main/resources/checkstyle_suppressions.xml
@@ -580,7 +580,6 @@
-
diff --git a/server/src/test/java/org/elasticsearch/action/support/replication/TransportWriteActionTestHelper.java b/test/framework/src/main/java/org/elasticsearch/action/support/replication/TransportWriteActionTestHelper.java
similarity index 100%
rename from server/src/test/java/org/elasticsearch/action/support/replication/TransportWriteActionTestHelper.java
rename to test/framework/src/main/java/org/elasticsearch/action/support/replication/TransportWriteActionTestHelper.java
diff --git a/server/src/test/java/org/elasticsearch/index/replication/ESIndexLevelReplicationTestCase.java b/test/framework/src/main/java/org/elasticsearch/index/replication/ESIndexLevelReplicationTestCase.java
similarity index 97%
rename from server/src/test/java/org/elasticsearch/index/replication/ESIndexLevelReplicationTestCase.java
rename to test/framework/src/main/java/org/elasticsearch/index/replication/ESIndexLevelReplicationTestCase.java
index 54b5c91f6a371..4450ec54d0863 100644
--- a/server/src/test/java/org/elasticsearch/index/replication/ESIndexLevelReplicationTestCase.java
+++ b/test/framework/src/main/java/org/elasticsearch/index/replication/ESIndexLevelReplicationTestCase.java
@@ -29,8 +29,8 @@
import org.elasticsearch.action.bulk.BulkItemResponse;
import org.elasticsearch.action.bulk.BulkShardRequest;
import org.elasticsearch.action.bulk.BulkShardResponse;
+import org.elasticsearch.action.bulk.MappingUpdatePerformer;
import org.elasticsearch.action.bulk.TransportShardBulkAction;
-import org.elasticsearch.action.bulk.TransportShardBulkActionTests;
import org.elasticsearch.action.delete.DeleteRequest;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.resync.ResyncReplicationRequest;
@@ -595,7 +595,8 @@ class IndexingAction extends ReplicationAction result = executeShardBulkOnPrimary(primary, request);
+ final TransportWriteAction.WritePrimaryResult
+ result = executeShardBulkOnPrimary(primary, request);
return new PrimaryResult(result.replicaRequest(), result.finalResponseIfSuccessful);
}
@@ -605,7 +606,8 @@ protected void performOnReplica(BulkShardRequest request, IndexShard replica) th
}
}
- private TransportWriteAction.WritePrimaryResult executeShardBulkOnPrimary(IndexShard primary, BulkShardRequest request) throws Exception {
+ private TransportWriteAction.WritePrimaryResult executeShardBulkOnPrimary(
+ IndexShard primary, BulkShardRequest request) throws Exception {
for (BulkItemRequest itemRequest : request.items()) {
if (itemRequest.request() instanceof IndexRequest) {
((IndexRequest) itemRequest.request()).process(Version.CURRENT, null, index.getName());
@@ -615,8 +617,8 @@ private TransportWriteAction.WritePrimaryResult result;
try (Releasable ignored = permitAcquiredFuture.actionGet()) {
- result = TransportShardBulkAction.performOnPrimary(request, primary, null, System::currentTimeMillis,
- new TransportShardBulkActionTests.NoopMappingUpdatePerformer());
+ MappingUpdatePerformer noopMappingUpdater = (update, shardId, type) -> { };
+ result = TransportShardBulkAction.performOnPrimary(request, primary, null, System::currentTimeMillis, noopMappingUpdater);
}
TransportWriteActionTestHelper.performPostWriteActions(primary, request, result.location, logger);
return result;
@@ -629,9 +631,11 @@ BulkShardRequest executeReplicationRequestOnPrimary(IndexShard primary, Request
return executeShardBulkOnPrimary(primary, bulkShardRequest).replicaRequest();
}
- private void executeShardBulkOnReplica(BulkShardRequest request, IndexShard replica, long operationPrimaryTerm, long globalCheckpointOnPrimary) throws Exception {
+ private void executeShardBulkOnReplica(BulkShardRequest request, IndexShard replica, long operationPrimaryTerm,
+ long globalCheckpointOnPrimary) throws Exception {
final PlainActionFuture permitAcquiredFuture = new PlainActionFuture<>();
- replica.acquireReplicaOperationPermit(operationPrimaryTerm, globalCheckpointOnPrimary, permitAcquiredFuture, ThreadPool.Names.SAME, request);
+ replica.acquireReplicaOperationPermit(
+ operationPrimaryTerm, globalCheckpointOnPrimary, permitAcquiredFuture, ThreadPool.Names.SAME, request);
final Translog.Location location;
try (Releasable ignored = permitAcquiredFuture.actionGet()) {
location = TransportShardBulkAction.performOnReplica(request, replica);
@@ -695,8 +699,8 @@ protected void performOnReplica(final GlobalCheckpointSyncAction.Request request
class ResyncAction extends ReplicationAction {
- ResyncAction(ResyncReplicationRequest request, ActionListener listener, ReplicationGroup replicationGroup) {
- super(request, listener, replicationGroup, "resync");
+ ResyncAction(ResyncReplicationRequest request, ActionListener listener, ReplicationGroup group) {
+ super(request, listener, group, "resync");
}
@Override