[
https://issues.apache.org/jira/browse/HDDS-1903?focusedWorklogId=296883&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-296883
]
ASF GitHub Bot logged work on HDDS-1903:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Aug/19 04:58
Start Date: 18/Aug/19 04:58
Worklog Time Spent: 10m
Work Description: bharatviswa504 commented on pull request #1303:
HDDS-1903 : Use dynamic ports for SCM in TestSCMClientProtocolServer …
URL: https://github.com/apache/hadoop/pull/1303#discussion_r314968173
##########
File path:
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/server/TestSCMSecurityProtocolServer.java
##########
@@ -32,10 +39,19 @@
@Rule
public Timeout timeout = new Timeout(1000 * 20);
+ private static int scmRpcSecurePort;
+
+ @BeforeClass
+ public static void setupClass() throws Exception {
+ scmRpcSecurePort = new ServerSocket(0).getLocalPort();
+ }
@Before
public void setUp() throws Exception {
config = new OzoneConfiguration();
+ config.set(OZONE_SCM_SECURITY_SERVICE_ADDRESS_KEY,
+ StringUtils.join(OZONE_SCM_SECURITY_SERVICE_BIND_HOST_DEFAULT,
+ ":", String.valueOf(scmRpcSecurePort)));
Review comment:
My comment is not related to the usage of StringUtils, we can directly use
OZONE_SCM_SECURITY_SERVICE_BIND_HOST_DEFAULT:0, instead of getting from
scmRpcSecurePort, which we get from new ServerSocket(0).getLocalPort(); In this
way during server start, it will choose available free random port.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 296883)
Time Spent: 2h 10m (was: 2h)
> Use dynamic ports for SCM in TestSCMClientProtocolServer and
> TestSCMSecurityProtocolServer
> ------------------------------------------------------------------------------------------
>
> Key: HDDS-1903
> URL: https://issues.apache.org/jira/browse/HDDS-1903
> Project: Hadoop Distributed Data Store
> Issue Type: Improvement
> Components: test
> Reporter: Nanda kumar
> Assignee: Aravindan Vijayan
> Priority: Major
> Labels: newbie, pull-request-available
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> We should use dynamic port for SCM in the following test-cases
> * TestSCMClientProtocolServer
> * TestSCMSecurityProtocolServer
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]