40
40
import org .elasticsearch .plugins .Plugin ;
41
41
import org .elasticsearch .snapshots .RestoreInfo ;
42
42
import org .elasticsearch .snapshots .RestoreService ;
43
- import org .elasticsearch .test .junit .annotations .TestLogging ;
44
43
import org .elasticsearch .test .transport .MockTransportService ;
45
44
import org .elasticsearch .transport .ConnectTransportException ;
45
+ import org .elasticsearch .transport .TransportActionProxy ;
46
46
import org .elasticsearch .transport .TransportService ;
47
47
import org .elasticsearch .xpack .CcrIntegTestCase ;
48
48
import org .elasticsearch .xpack .ccr .action .repositories .ClearCcrRestoreSessionAction ;
@@ -191,7 +191,6 @@ public void testRetentionLeaseIsTakenAtTheStartOfRecovery() throws Exception {
191
191
192
192
}
193
193
194
- @ TestLogging (value = "org.elasticsearch.xpack.ccr:trace" )
195
194
public void testRetentionLeaseIsRenewedDuringRecovery () throws Exception {
196
195
final String leaderIndex = "leader" ;
197
196
final int numberOfShards = randomIntBetween (1 , 3 );
@@ -212,10 +211,9 @@ public void testRetentionLeaseIsRenewedDuringRecovery() throws Exception {
212
211
(MockTransportService ) getFollowerCluster ().getInstance (TransportService .class , senderNode .value .getName ());
213
212
senderTransportService .addSendBehavior (
214
213
(connection , requestId , action , request , options ) -> {
215
- logger . info ( " action [{}]" , action );
216
- if (ClearCcrRestoreSessionAction .NAME .equals (action )) {
214
+ if ( ClearCcrRestoreSessionAction . NAME . equals ( action )
215
+ || TransportActionProxy . getProxyAction (ClearCcrRestoreSessionAction .NAME ) .equals (action )) {
217
216
try {
218
- logger .info ("latching" );
219
217
latch .await ();
220
218
} catch (final InterruptedException e ) {
221
219
fail (e .toString ());
@@ -436,7 +434,8 @@ public void testUnfollowRemovesRetentionLeases() throws Exception {
436
434
(MockTransportService ) getFollowerCluster ().getInstance (TransportService .class , senderNode .value .getName ());
437
435
senderTransportService .addSendBehavior (
438
436
(connection , requestId , action , request , options ) -> {
439
- if (RetentionLeaseActions .Remove .ACTION_NAME .equals (action )) {
437
+ if (RetentionLeaseActions .Remove .ACTION_NAME .equals (action )
438
+ || TransportActionProxy .getProxyAction (RetentionLeaseActions .Remove .ACTION_NAME ).equals (action )) {
440
439
final RetentionLeaseActions .RemoveRequest removeRequest = (RetentionLeaseActions .RemoveRequest ) request ;
441
440
if (shardIds .contains (removeRequest .getShardId ().id ())) {
442
441
final String primaryShardNodeId =
@@ -520,7 +519,8 @@ public void testUnfollowFailsToRemoveRetentionLeases() throws Exception {
520
519
(MockTransportService ) getFollowerCluster ().getInstance (TransportService .class , senderNode .value .getName ());
521
520
senderTransportService .addSendBehavior (
522
521
(connection , requestId , action , request , options ) -> {
523
- if (RetentionLeaseActions .Remove .ACTION_NAME .equals (action )) {
522
+ if (RetentionLeaseActions .Remove .ACTION_NAME .equals (action )
523
+ || TransportActionProxy .getProxyAction (RetentionLeaseActions .Remove .ACTION_NAME ).equals (action )) {
524
524
final RetentionLeaseActions .RemoveRequest removeRequest = (RetentionLeaseActions .RemoveRequest ) request ;
525
525
if (shardIds .contains (removeRequest .getShardId ().id ())) {
526
526
throw randomBoolean ()
0 commit comments