[ 
https://issues.apache.org/jira/browse/SOLR-13869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16972776#comment-16972776
 ] 

ASF subversion and git services commented on SOLR-13869:
--------------------------------------------------------

Commit 3a5d67b87b2c5babfd42e822894d5a19281fed82 in lucene-solr's branch 
refs/heads/master from Chris M. Hostetter
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=3a5d67b ]

SOLR-13869: remove deprecated SolrTestCaseJ4.getNextAvailablePort() from master


> deprecated and remove SolrTestCaseJ4.getNextAvailablePort
> ---------------------------------------------------------
>
>                 Key: SOLR-13869
>                 URL: https://issues.apache.org/jira/browse/SOLR-13869
>             Project: Solr
>          Issue Type: Sub-task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Chris M. Hostetter
>            Assignee: Chris M. Hostetter
>            Priority: Major
>
> {{SolrTestCaseJ4.getNextAvailablePort()}} is a problematic method in that the 
> entire premise assumes that since the OS allowed us to bind to a port once, 
> it will allow us to re-bind to that port again at some future point in the 
> text execution -- but that is not garunteed, as soon as 
> getNextAvailablePort() releases the port assigned to {{new ServerSocket(0)}} 
> the OS may allocate that port to some other process.
> We should deprecate & remove this method {{getNextAvailablePort()}} to 
> prevent tests from adopting this bad pattern.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to