[ https://issues.apache.org/jira/browse/SOLR-16983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765875#comment-17765875 ]
Chris M. Hostetter commented on SOLR-16983: ------------------------------------------- I believe the most straightforward fix is to simply remove the {{ObjectReleaseTracker.clear()}} call from {{SolrTestCaseJ4}} – that code probably should have been removed long long ago whenever the "check" logic got moved to the {{SolrTestCase}} base class. 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 – tests that should have been failing for a long time, either because the test doesn't properly cleanup, or because the code being tested has an underlying object leak bug. I don't think i have the bandwidth or energy to try and fix all of these – so help would be appreciated from anyone that wants to help up and try to tackle this. > 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: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org