@@ -133,6 +133,7 @@ public void testDefaultSkipsMetaWAL() throws IOException {
133133 ReplicationPeerConfig peerConfig = Mockito .mock (ReplicationPeerConfig .class );
134134 Mockito .when (peerConfig .getReplicationEndpointImpl ())
135135 .thenReturn (DoNothingReplicationEndpoint .class .getName ());
136+ Mockito .when (peerConfig .getSleepForRetries ()).thenReturn (0L );
136137 Mockito .when (mockPeer .getPeerConfig ()).thenReturn (peerConfig );
137138 ReplicationSourceManager manager = Mockito .mock (ReplicationSourceManager .class );
138139 Mockito .when (manager .getGlobalMetrics ())
@@ -174,6 +175,7 @@ public void testWALEntryFilter() throws IOException {
174175 ReplicationPeerConfig peerConfig = Mockito .mock (ReplicationPeerConfig .class );
175176 Mockito .when (peerConfig .getReplicationEndpointImpl ())
176177 .thenReturn (DoNothingReplicationEndpoint .class .getName ());
178+ Mockito .when (peerConfig .getSleepForRetries ()).thenReturn (0L );
177179 Mockito .when (mockPeer .getPeerConfig ()).thenReturn (peerConfig );
178180 ReplicationSourceManager manager = Mockito .mock (ReplicationSourceManager .class );
179181 RegionServerServices rss =
@@ -260,7 +262,10 @@ public void testTerminateTimeout() throws Exception {
260262 try {
261263 replicationEndpoint .start ();
262264 ReplicationPeer mockPeer = Mockito .mock (ReplicationPeer .class );
265+ ReplicationPeerConfig mockPeerConfig = Mockito .mock (ReplicationPeerConfig .class );
263266 Mockito .when (mockPeer .getPeerBandwidth ()).thenReturn (0L );
267+ Mockito .when (mockPeer .getPeerConfig ()).thenReturn (mockPeerConfig );
268+ Mockito .when (mockPeerConfig .getSleepForRetries ()).thenReturn (0L );
264269 Configuration testConf = HBaseConfiguration .create ();
265270 testConf .setInt ("replication.source.maxretriesmultiplier" , 1 );
266271 ReplicationSourceManager manager = Mockito .mock (ReplicationSourceManager .class );
@@ -284,7 +289,10 @@ public void testTerminateClearsBuffer() throws Exception {
284289 ReplicationSourceManager mockManager = new ReplicationSourceManager (null , null , conf , null ,
285290 null , null , null , null , null , null , mock (MetricsReplicationGlobalSourceSource .class ));
286291 ReplicationPeer mockPeer = mock (ReplicationPeer .class );
292+ ReplicationPeerConfig mockPeerConfig = mock (ReplicationPeerConfig .class );
287293 Mockito .when (mockPeer .getPeerBandwidth ()).thenReturn (0L );
294+ Mockito .when (mockPeer .getPeerConfig ()).thenReturn (mockPeerConfig );
295+ Mockito .when (mockPeerConfig .getSleepForRetries ()).thenReturn (0L );
288296 Configuration testConf = HBaseConfiguration .create ();
289297 ReplicationQueueId queueId =
290298 new ReplicationQueueId (ServerName .valueOf ("test,123,123" ), "testPeer" );
@@ -501,6 +509,7 @@ private RegionServerServices setupForAbortTests(ReplicationSource rs, Configurat
501509 ReplicationPeerConfig peerConfig = Mockito .mock (ReplicationPeerConfig .class );
502510 FaultyReplicationEndpoint .count = 0 ;
503511 Mockito .when (peerConfig .getReplicationEndpointImpl ()).thenReturn (endpointName );
512+ Mockito .when (peerConfig .getSleepForRetries ()).thenReturn (0L );
504513 Mockito .when (mockPeer .getPeerConfig ()).thenReturn (peerConfig );
505514 ReplicationSourceManager manager = Mockito .mock (ReplicationSourceManager .class );
506515 Mockito .when (manager .getGlobalMetrics ())
0 commit comments