diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 304c14ef27a..b966ca7a2a2 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -95,6 +95,9 @@ Other Changes * SOLR-13824: Strictly reject anything after JSON in most APIs (Mikhail Khludnev, Munendra S N) +* SOLR-13864: SolrTestCaseJ4.getNextAvailablePort() has been deprecated (and will be removed in 9.0) since + it is fundementally flawed. Users with tests that depend on this method should restructure them. (hossman) + ================== 8.3.0 ================== Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release. diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java index 958cb6b7aa6..b67e336df97 100644 --- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java +++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java @@ -902,7 +902,10 @@ public abstract class SolrTestCaseJ4 extends SolrTestCase { * Find next available local port. * @return available port number or -1 if none could be found * @throws Exception on IO errors + * @see SOLR-13869 + * @deprecated This method is inherently flawed, see SOLR-13869 */ + @Deprecated protected static int getNextAvailablePort() throws Exception { int port = -1; try (ServerSocket s = new ServerSocket(0)) {