42
42
import org .elasticsearch .snapshots .RestoreService ;
43
43
import org .elasticsearch .test .transport .MockTransportService ;
44
44
import org .elasticsearch .transport .ConnectTransportException ;
45
+ import org .elasticsearch .transport .TransportActionProxy ;
45
46
import org .elasticsearch .transport .TransportService ;
46
47
import org .elasticsearch .xpack .CcrIntegTestCase ;
47
48
import org .elasticsearch .xpack .ccr .action .repositories .ClearCcrRestoreSessionAction ;
@@ -190,7 +191,6 @@ public void testRetentionLeaseIsTakenAtTheStartOfRecovery() throws Exception {
190
191
191
192
}
192
193
193
- @ AwaitsFix (bugUrl ="https://github.com/elastic/elasticsearch/issues/39268" )
194
194
public void testRetentionLeaseIsRenewedDuringRecovery () throws Exception {
195
195
final String leaderIndex = "leader" ;
196
196
final int numberOfShards = randomIntBetween (1 , 3 );
@@ -211,7 +211,8 @@ public void testRetentionLeaseIsRenewedDuringRecovery() throws Exception {
211
211
(MockTransportService ) getFollowerCluster ().getInstance (TransportService .class , senderNode .value .getName ());
212
212
senderTransportService .addSendBehavior (
213
213
(connection , requestId , action , request , options ) -> {
214
- if (ClearCcrRestoreSessionAction .NAME .equals (action )) {
214
+ if (ClearCcrRestoreSessionAction .NAME .equals (action )
215
+ || TransportActionProxy .getProxyAction (ClearCcrRestoreSessionAction .NAME ).equals (action )) {
215
216
try {
216
217
latch .await ();
217
218
} catch (final InterruptedException e ) {
@@ -433,7 +434,8 @@ public void testUnfollowRemovesRetentionLeases() throws Exception {
433
434
(MockTransportService ) getFollowerCluster ().getInstance (TransportService .class , senderNode .value .getName ());
434
435
senderTransportService .addSendBehavior (
435
436
(connection , requestId , action , request , options ) -> {
436
- if (RetentionLeaseActions .Remove .ACTION_NAME .equals (action )) {
437
+ if (RetentionLeaseActions .Remove .ACTION_NAME .equals (action )
438
+ || TransportActionProxy .getProxyAction (RetentionLeaseActions .Remove .ACTION_NAME ).equals (action )) {
437
439
final RetentionLeaseActions .RemoveRequest removeRequest = (RetentionLeaseActions .RemoveRequest ) request ;
438
440
if (shardIds .contains (removeRequest .getShardId ().id ())) {
439
441
final String primaryShardNodeId =
@@ -517,7 +519,8 @@ public void testUnfollowFailsToRemoveRetentionLeases() throws Exception {
517
519
(MockTransportService ) getFollowerCluster ().getInstance (TransportService .class , senderNode .value .getName ());
518
520
senderTransportService .addSendBehavior (
519
521
(connection , requestId , action , request , options ) -> {
520
- if (RetentionLeaseActions .Remove .ACTION_NAME .equals (action )) {
522
+ if (RetentionLeaseActions .Remove .ACTION_NAME .equals (action )
523
+ || TransportActionProxy .getProxyAction (RetentionLeaseActions .Remove .ACTION_NAME ).equals (action )) {
521
524
final RetentionLeaseActions .RemoveRequest removeRequest = (RetentionLeaseActions .RemoveRequest ) request ;
522
525
if (shardIds .contains (removeRequest .getShardId ().id ())) {
523
526
throw randomBoolean ()
0 commit comments