[
https://issues.apache.org/jira/browse/SOLR-16983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765884#comment-17765884
]
Chris M. Hostetter commented on SOLR-16983:
-------------------------------------------
bq. But based on a quick check (w/o trying multiple seeds, or running nightly)
fixing this test framework bug is going to cause at least ~17 test classes to
start failing ...
Skimming these failures, some of them are probably legit leaks of
{{SolrClient}} instances in tests -- but the majority of them relate to
"leaked" instances of
{{org.eclipse.jetty.client.util.InputStreamResponseListener$Input}} that seem
like false positives because {{Http2SolrClient}} calls
{{ObjectReleaseTracker.track(...)}} on instances of {{InputStream}} returned by
{{InputStreamResponseListener}} but there are code paths where
{{Http2SolrClient}} explicitly doesn't close/release an {{InputStream}} because
it returns it to the caller -- most of which don't seem to make any attempt to
call {{ObjectReleaseTracker.release(...)}} on them.
Fixing this could either involve adding a crap ton of
{{ObjectReleaseTracker.release(inputStream)}} calls all over the code base, or
we could replace/subclass {{InputStreamResponseListener}} w/our own impl that
created & returned custom {{InputStream}} wrappers that handle the
{{ObjectReleaseTracker}} tracking & releasing in it's own constructor and
{{close()}} method.
> ObjectReleaseTracker completely useless in all SolrTestCaseJ4 based tests
> -------------------------------------------------------------------------
>
> Key: SOLR-16983
> URL: https://issues.apache.org/jira/browse/SOLR-16983
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Chris M. Hostetter
> Priority: Major
> Attachments: SOLR-16983.bug-demo.nocommit.patch
>
>
>
> {{SolrTestCase}} has a {{@ClassRule}} named {{solrClassRules}} which calls
> {{ObjectReleaseTracker.clearObjectTrackerAndCheckEmpty()}} in it's
> {{afterIfSuccessful()}} method to ensure that any objects which use
> {{ObjectReleaseTracker}} are correctly released (ie: closed)
> _*...BUT...*_
> {{SolrTestCaseJ4}} has an {{@AfterClass}} method named
> {{teardownTestCases()}} which calls {{ObjectReleaseTracker.clear()}} _before_
> the {{afterIfSuccessful()}} method of it's parent class's {{solrClassRules}}
> gets to run.
> ... Which means that {{ObjectReleaseTracker}} is completley useless in every
> test that descends from {{{}SolrTestCaseJ4{}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]