Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14000

clean up more static field leaks in tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 8.4
    • None
    • None

    Description

      See build https://jenkins.thetaphi.de/job/Lucene-Solr-8.x-Windows/577/ for example, stuff like this:

      Stack Trace:
      junit.framework.AssertionFailedError: Clean up static fields (in @AfterClass?) and null them, your test still has references to classes of which the sizes cannot be measured due to security restrictions or Java 9 module encapsulation:
        - private static org.apache.solr.prometheus.scraper.SolrStandaloneScraper org.apache.solr.prometheus.scraper.SolrStandaloneScraperTest.solrScraper
        - private static org.apache.solr.client.solrj.impl.HttpSolrClient org.apache.solr.prometheus.scraper.SolrStandaloneScraperTest.solrClient
      

      Looks like security manager issue, but its not, its just static leaks in tests. Its just that the thing they leak can't be inspected to see how "big" the leak is (apparently the objects were below some threshold before).

      We should just plug the leaks, null them out in AfterClass.

      Attachments

        1. SOLR-14000.patch
          17 kB
          Robert Muir

        Issue Links

          Activity

            People

              rcmuir Robert Muir
              rcmuir Robert Muir
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: