Add cleanup logic to CCR retention lease test
This commit adds some logic to remove the mock transport rules at the
end of a CCR retention lease test.
@@ -459,7 +459,11 @@ public class CcrRetentionLeaseIT extends CcrIntegTestCase {
assertThat(shardStats.getRetentionLeaseStats().retentionLeases().leases(), empty());
}
} finally {
-
+ for (final ObjectCursor<DiscoveryNode> senderNode : followerClusterState.getState().nodes().getDataNodes().values()) {
+ final MockTransportService senderTransportService =
+ (MockTransportService) getFollowerCluster().getInstance(TransportService.class, senderNode.value.getName());
+ senderTransportService.clearAllRules();
+ }
}
}
