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

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

Commit 8c49326e71b2c18388b25c8c77ff3fbdda666be8 in solr's branch 
refs/heads/dependabot/gradle/netty-4.2.13.Final from David Smiley
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=8c49326e71b ]

SOLR-18188: Misc test fixes (#4496)

Accumulated from several commits on the misc-test-fixes branch.

PrepRecoveryOp: add class-level javadoc to explain its purpose.

ShowFileRequestHandlerTest, TestPrometheusResponseWriter,
TestCborDataFormat: close response streams to fix resource leaks
flagged by the test framework.

TestDistributedTracing: add retry logic around span assertions to
reduce flakiness caused by timing-sensitive telemetry delivery.

SocketProxy: call setSoTimeout(1000) on the server socket so the
accept loop unblocks promptly when close() is called. Without a
timeout the acceptor thread blocks indefinitely in accept() and
leaks, causing test hangs or "thread leaked" warnings.

JettySolrRunner: move proxy.close() to before server.stop() rather
than leaving it in the finally block. If qtp.join() hangs (e.g. stuck
PrepRecoveryOp handlers or H2C session threads) the finally block is
never reached, leaving the SocketProxy acceptor thread leaked. Closing
the proxy first ensures cleanup even when server shutdown hangs.

HttpJettySolrClientCompatibilityTest: switch from @ClassRule to @Rule
so the Jetty server lifecycle is per-test as intended.

TestSolrJ: delete this file -- it contains no actual tests.

ClientUtils: add Objects.requireNonNull() guard on serverRootUrl to
surface null earlier with a clear error rather than a cryptic NPE
downstream.

AbstractFullDistribZkTestBase: wrap control-collection creation in
RetryUtil.retryOnException() to tolerate transient ZooKeeper errors
during setup. Also move coreClients.clear(),
solrClientByCollection.clear(), and super.destroyServers() into a
finally block after ExecutorUtil.shutdownAndAwaitTermination() so
teardown always completes even if the executor shutdown throws.

HttpPartitionTest: decrease leaderConflictResolveWait to 10sec so 
stale PrepRecoveryOp handlers time out within the Jetty graceful stop window

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>

> solr-test-framework: Remove Apache HttpClient usages
> ----------------------------------------------------
>
>                 Key: SOLR-18188
>                 URL: https://issues.apache.org/jira/browse/SOLR-18188
>             Project: Solr
>          Issue Type: Task
>          Components: test-framework, Tests
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 6h 40m
>  Remaining Estimate: 0h
>
> As of this writing, the last usages of Apache HttpClient are in Solr's tests. 
>  This issue aims to remove it completely.  But it's a lot of work.
> Some possible steps:
>  * Remove tests for our HttpSolrClient & friends (fundamentally based on 
> Apache HttpClient)
>  * Replace usages of HttpSolrClient.getHttpClient with 
> HttpJettySolrClient.getHttpClient
>  * Replace usages of HttpSolrClient.getBaseURL by introducing a new base 
> client that has this method.  Or access similarly from Jetty when easily 
> available.
>  * of course, stop using HttpSolrClient & friends.  Maybe class-by-class.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to