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

Close ZkClientClusterStateProvider in tests to avoid thread leak

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 9.1, main (10.0), 9.0.1
    • Tests
    • None

    Description

      https://lists.apache.org/list?builds@solr.apache.org:lte=1M:org.apache.solr.client.solrj.impl.CloudSolrClientBuilderTest.classMethod

      I personally haven't seen this fail locally, but looking at the test, ZkClientClusterStateProvider is created but never closed.

      magibney pointed out in the PR this problem most likely exists elsewhere so will fix it up all at once:

      > find solr -name '*.java' | xargs grep -l 'ZkClientClusterStateProvider\.from('
      solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java
      solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java
      solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
      solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientBuilderTest.java
      solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
      solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientMultiConstructorTest.java
      

      Attachments

        Issue Links

          Activity

            People

              krisden Kevin Risden
              krisden Kevin Risden
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m