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

Add a deleteAllCollections() method to MiniSolrCloudCluster

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.3
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      This would make test tearDown easier in lots of places.

      1. SOLR-9632.patch
        4 kB
        Alan Woodward

        Activity

        Hide
        romseygeek Alan Woodward added a comment -

        From the mailing list, re SOLR-9132:

        Hoss Man wrote:
        It's not immediately obvious to me why these collection deletions can't be
        done in an @After method – but if they need to live in each test method
        can we at least have an @After method that asserts no collections exist
        (via a STATUS call) so if someone writes a new test method but forgets to
        delete that collection then the @After method will catch it and give them
        a self explanatory failure instead of some future confusing/trappy error
        that depends on test order or what not?

        Alan Woodward wrote:
        They all have different collection names, which is why we can’t do it in an @After method, but you’re right, it is trappy. How about instead we add a .deleteAllCollections() command to MiniSolrCloudCluster, which will ensure that each test starts up in an empty cluster?

        Show
        romseygeek Alan Woodward added a comment - From the mailing list, re SOLR-9132 : Hoss Man wrote: It's not immediately obvious to me why these collection deletions can't be done in an @After method – but if they need to live in each test method can we at least have an @After method that asserts no collections exist (via a STATUS call) so if someone writes a new test method but forgets to delete that collection then the @After method will catch it and give them a self explanatory failure instead of some future confusing/trappy error that depends on test order or what not? Alan Woodward wrote: They all have different collection names, which is why we can’t do it in an @After method, but you’re right, it is trappy. How about instead we add a .deleteAllCollections() command to MiniSolrCloudCluster, which will ensure that each test starts up in an empty cluster?
        Hide
        romseygeek Alan Woodward added a comment -

        Patch, adding the method as described and changing RulesTest to use it.

        Show
        romseygeek Alan Woodward added a comment - Patch, adding the method as described and changing RulesTest to use it.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit d6dc1321a9010752463ae2a54a0b940e6877b3df in lucene-solr's branch refs/heads/branch_6x from Alan Woodward
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d6dc132 ]

        SOLR-9632: Add deleteAllCollections method to MiniSolrCloudCluster

        Show
        jira-bot ASF subversion and git services added a comment - Commit d6dc1321a9010752463ae2a54a0b940e6877b3df in lucene-solr's branch refs/heads/branch_6x from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d6dc132 ] SOLR-9632 : Add deleteAllCollections method to MiniSolrCloudCluster
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 20ea5355c91e61617d59310ea51ca5cb5383c490 in lucene-solr's branch refs/heads/master from Alan Woodward
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=20ea535 ]

        SOLR-9632: Add deleteAllCollections method to MiniSolrCloudCluster

        Show
        jira-bot ASF subversion and git services added a comment - Commit 20ea5355c91e61617d59310ea51ca5cb5383c490 in lucene-solr's branch refs/heads/master from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=20ea535 ] SOLR-9632 : Add deleteAllCollections method to MiniSolrCloudCluster
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Closing after 6.3.0 release.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Closing after 6.3.0 release.

          People

          • Assignee:
            romseygeek Alan Woodward
            Reporter:
            romseygeek Alan Woodward
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development