|
@@ -50,7 +50,6 @@ import org.apache.hadoop.test.MetricsAsserts;
|
|
|
import org.apache.hadoop.test.MockitoUtil;
|
|
|
import org.junit.Before;
|
|
|
import org.junit.Test;
|
|
|
-import org.mockito.Mockito;
|
|
|
import org.mockito.internal.util.reflection.Whitebox;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -96,6 +95,8 @@ import static org.junit.Assert.assertNotSame;
|
|
|
import static org.junit.Assert.assertSame;
|
|
|
import static org.junit.Assert.assertTrue;
|
|
|
import static org.junit.Assert.fail;
|
|
|
+import static org.mockito.Matchers.any;
|
|
|
+import static org.mockito.Matchers.eq;
|
|
|
import static org.mockito.Mockito.spy;
|
|
|
import static org.mockito.Mockito.timeout;
|
|
|
import static org.mockito.Mockito.verify;
|
|
@@ -1123,7 +1124,7 @@ public class TestRPC extends TestRpcBase {
|
|
|
return null;
|
|
|
}
|
|
|
}));
|
|
|
- verify(spy, timeout(500).times(i + 1)).add(Mockito.<Call>anyObject());
|
|
|
+ verify(spy, timeout(500).times(i + 1)).addInternal(any(), eq(false));
|
|
|
}
|
|
|
try {
|
|
|
proxy.sleep(null, newSleepRequest(100));
|
|
@@ -1194,7 +1195,7 @@ public class TestRPC extends TestRpcBase {
|
|
|
return null;
|
|
|
}
|
|
|
}));
|
|
|
- verify(spy, timeout(500).times(i + 1)).add(Mockito.<Call>anyObject());
|
|
|
+ verify(spy, timeout(500).times(i + 1)).addInternal(any(), eq(false));
|
|
|
}
|
|
|
// Start another sleep RPC call and verify the call is backed off due to
|
|
|
// avg response time(3s) exceeds threshold (2s).
|