Solr
  1. Solr
  2. SOLR-5684

Shutdown SolrServer clients created in BasicDistributedZk2Test and BasicDistributedZkTest

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 4.7, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      I found that the tests BasicDistributedZk2Test and BasicDistributedZkTest are creating multiple HttpSolrServer objects to which they don't call the shutdown method after using them.

      1. SOLR-5684.patch
        8 kB
        Shalin Shekhar Mangar
      2. SOLR-5684.patch
        9 kB
        Tomás Fernández Löbbe

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        Thanks Tomás. After applying your patch, ShardSplitTest and MigrateRouteKeyTest fail with a NPE during tearDown:

        java.lang.NullPointerException
                at __randomizedtesting.SeedInfo.seed([AA93C46841BC7A14:2B754A7036E31A28]:0)
                at org.apache.solr.cloud.BasicDistributedZkTest.tearDown(BasicDistributedZkTest.java:1186)
                at org.apache.solr.cloud.ShardSplitTest.tearDown(ShardSplitTest.java:96)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        
        Show
        Shalin Shekhar Mangar added a comment - Thanks Tomás. After applying your patch, ShardSplitTest and MigrateRouteKeyTest fail with a NPE during tearDown: java.lang.NullPointerException at __randomizedtesting.SeedInfo.seed([AA93C46841BC7A14:2B754A7036E31A28]:0) at org.apache.solr.cloud.BasicDistributedZkTest.tearDown(BasicDistributedZkTest.java:1186) at org.apache.solr.cloud.ShardSplitTest.tearDown(ShardSplitTest.java:96) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        Hide
        Shalin Shekhar Mangar added a comment -

        Checks for null otherCollectionClients during tearDown.

        Show
        Shalin Shekhar Mangar added a comment - Checks for null otherCollectionClients during tearDown.
        Hide
        ASF subversion and git services added a comment -

        Commit 1563390 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1563390 ]

        SOLR-5684: Shutdown SolrServer clients created in BasicDistributedZk2Test and BasicDistributedZkTest

        Show
        ASF subversion and git services added a comment - Commit 1563390 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1563390 ] SOLR-5684 : Shutdown SolrServer clients created in BasicDistributedZk2Test and BasicDistributedZkTest
        Hide
        ASF subversion and git services added a comment -

        Commit 1563391 from shalin@apache.org in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1563391 ]

        SOLR-5684: Shutdown SolrServer clients created in BasicDistributedZk2Test and BasicDistributedZkTest

        Show
        ASF subversion and git services added a comment - Commit 1563391 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1563391 ] SOLR-5684 : Shutdown SolrServer clients created in BasicDistributedZk2Test and BasicDistributedZkTest
        Hide
        Shalin Shekhar Mangar added a comment -

        Thanks Tomás!

        Show
        Shalin Shekhar Mangar added a comment - Thanks Tomás!
        Hide
        Tomás Fernández Löbbe added a comment -

        Thanks Shalin. For some reason I didn't see those test failing locally.

        Show
        Tomás Fernández Löbbe added a comment - Thanks Shalin. For some reason I didn't see those test failing locally.

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Tomás Fernández Löbbe
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development