lucene-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris M. Hostetter (Jira)" <>
Subject [jira] [Commented] (SOLR-13869) deprecated and remove SolrTestCaseJ4.getNextAvailablePort
Date Tue, 12 Nov 2019 21:07:00 GMT


Chris M. Hostetter commented on SOLR-13869:

I screwed up the jira tagging in the original deprecation commits...
* master:;h=603be02
* 8x:;h=b872863

> deprecated and remove SolrTestCaseJ4.getNextAvailablePort
> ---------------------------------------------------------
>                 Key: SOLR-13869
>                 URL:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message