[ https://issues.apache.org/jira/browse/SOLR-16983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris M. Hostetter updated SOLR-16983: -------------------------------------- Attachment: SOLR-16983-1.patch Status: Open (was: Open) I've updated the patch to fix a few more failures. In at least one of the remaining outstanding problems, the code is calling this method in {{SolrTestCaseJ4...}} {code:java} /** This method creates a HttpClient from a URL. */ @Deprecated // We are migrating away from Apache HttpClient. public static HttpClient getHttpClient(String url) { return new HttpSolrClient.Builder(url).build().getHttpClient(); } {code} ...which is a disaster ... no clean way to close the {{HttpSolrClient}} that gets leaked, and the no easy way to "close" the {{HttpClient}} interface which is returned. not sure what to do about any of that. ---- {quote}bq. I wish we had a test that was checking that the O.R.T. was operational. Your proposal showed the problem but didn't appear to be something we could commit. {quote} We have a test tha ObjectReleaseTracker does what it says it will do, the problem is there's no way (i know of) to write a test that proves the test baseclasses (and their combinations of rules) will fail when expected) > 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-1.patch, SOLR-16983.bug-demo.nocommit.patch, > SOLR-16983.patch, test-output-if-clear-is-removed-from-SolrTestCaseJ4.txt.gz > > > > {{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: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org