[
https://issues.apache.org/jira/browse/HADOOP-19881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18078802#comment-18078802
]
ASF GitHub Bot commented on HADOOP-19881:
-----------------------------------------
Copilot commented on code in PR #8472:
URL: https://github.com/apache/hadoop/pull/8472#discussion_r3197964550
##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/oncrpc/TestFrameDecoder.java:
##########
@@ -22,6 +22,8 @@
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import java.io.IOException;
Review Comment:
`java.io.IOException` is imported but not used in this test class. This will
fail the build under the project Checkstyle rules (`UnusedImports`). Remove the
unused import (or use it if intended).
##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/oncrpc/TestFrameDecoder.java:
##########
@@ -235,19 +237,45 @@ private static int startRpcServer(boolean
allowInsecurePorts)
"localhost", serverPort, 100000, 1, 2, allowInsecurePorts);
tcpServer = new SimpleTcpServer(serverPort, program, 1);
tcpServer.run();
- break; // Successfully bound a port, break out.
- } catch (InterruptedException | ChannelException e) {
+ return serverPort; // Successfully bound a port.
+ } catch (InterruptedException e) {
if (tcpServer != null) {
tcpServer.shutdown();
}
- if (retries
> Fix "port in use" detection in TestFrameDecoder
> -----------------------------------------------
>
> Key: HADOOP-19881
> URL: https://issues.apache.org/jira/browse/HADOOP-19881
> Project: Hadoop Common
> Issue Type: Test
> Reporter: Cheng Pan
> Priority: Major
> Labels: pull-request-available
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]