From a57105462be57840ee0a5646be2c443228776931 Mon Sep 17 00:00:00 2001 From: hfutatzhanghb Date: Fri, 5 Jul 2024 14:41:39 +0800 Subject: [PATCH] HADOOP-19215. Fix unit tests testSlowConnection and testBadSetup failed in TestRPC. (#6912). Contributed by farmmamba. Reviewed-by: huhaiyang Signed-off-by: Ayush Saxena --- .../src/test/java/org/apache/hadoop/ipc/TestRPC.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java index f9b03721b5..17f1f65261 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java @@ -1038,7 +1038,7 @@ public int read() throws IOException { // disable ping & timeout to minimize traffic clientConf.setBoolean(CommonConfigurationKeys.IPC_CLIENT_PING_KEY, false); clientConf.setInt(CommonConfigurationKeys.IPC_CLIENT_RPC_TIMEOUT_KEY, 0); - RPC.setProtocolEngine(clientConf, TestRpcService.class, ProtobufRpcEngine.class); + RPC.setProtocolEngine(clientConf, TestRpcService.class, ProtobufRpcEngine2.class); // set async mode so that we don't need to implement the input stream final boolean wasAsync = Client.isAsynchronousMode(); TestRpcService client = null; @@ -1165,7 +1165,7 @@ public void testBadSetup() throws Exception { clientConf.set(CommonConfigurationKeys.IPC_MAXIMUM_RESPONSE_LENGTH, "xxx"); RPC.setProtocolEngine(clientConf, TestRpcService.class, - ProtobufRpcEngine.class); + ProtobufRpcEngine2.class); TestRpcService client = null; int threadCount = Thread.getAllStackTraces().size(); try {