You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Mike Percy (JIRA)" <ji...@apache.org> on 2013/06/14 03:13:20 UTC
[jira] [Commented] (FLUME-2026) TestHTTPSource should use any
available port rather than a hardcoded port number
[ https://issues.apache.org/jira/browse/FLUME-2026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13682983#comment-13682983 ]
Mike Percy commented on FLUME-2026:
-----------------------------------
On this one, it would be better to use the pattern where you create a new server socket on port 0, query it to find the port assigned by the OS, then close the socket. Use that port in the test. The OS will not assign that port again right away and you are guaranteed to be able to use it.
See the findFreePort() utility function in the embedded agent test:
https://github.com/apache/flume/blob/trunk/flume-ng-embedded-agent/src/test/java/org/apache/flume/agent/embedded/TestEmbeddedAgent.java#L180
> TestHTTPSource should use any available port rather than a hardcoded port number
> --------------------------------------------------------------------------------
>
> Key: FLUME-2026
> URL: https://issues.apache.org/jira/browse/FLUME-2026
> Project: Flume
> Issue Type: Bug
> Reporter: Hari Shreedharan
> Assignee: Hari Shreedharan
> Attachments: FLUME-2026.patch
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira