HBASE-26787 TestRegionReplicaReplicationError should inject error in replicateToReplica method (#4148)

This commit is contained in:
chenglei 2022-03-03 12:00:45 +08:00 committed by GitHub
parent b81ddd83bc
commit 1b994a179b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -76,8 +76,8 @@ public class TestRegionReplicaReplicationError {
}
@Override
public ReplicateWALEntryResponse replay(RpcController controller,
ReplicateWALEntryRequest request) throws ServiceException {
public ReplicateWALEntryResponse replicateToReplica(RpcController controller,
ReplicateWALEntryRequest request) throws ServiceException {
List<WALEntry> entries = request.getEntryList();
if (CollectionUtils.isEmpty(entries)) {
return ReplicateWALEntryResponse.getDefaultInstance();
@ -93,9 +93,8 @@ public class TestRegionReplicaReplicationError {
if (region.getRegionInfo().getReplicaId() == 1 && count.addAndGet(entries.size()) < 100) {
throw new ServiceException("Inject error!");
}
return super.replay(controller, request);
return super.replicateToReplica(controller, request);
}
}
public static final class RSForTest