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

BaseDistributedSearchTestCase.getSolrXml() not used consistently - multiple divergent ways a JettySolrRunner may be inited

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.1, 6.0
    • None
    • None

    Description

      As part of SOLR-6349, i wanted to take advantage of the new features in SOLR-7147 to inspect shard requests in TestDistributedSearch, but even though i added a proper override of getSolrXml...

        @Override
        protected String getSolrXml() {
          return "solr-trackingshardhandler.xml"; 
        }
      

      ...that value was being ignored, and i was never getting an instance of TrackingShardHandlerFactory.

      I poked around a bit and confirmed that getSolrXml() is used by "setupJettySolrHome(File)" but that method is never called by BaseDistributedSearchTestCase - it's only called in framework subclasses like AbstractDistribZkTestBase and AbstractFullDistribZkTestBase. Instead, for simple subclasses of BaseDistributedSearchTestCase the jetty instances seem to be coming from createServers(int)


      I don't really understand why there are so many diff ways for a shard instance to be inited, and presumably that should be refactored? .. but a more immediate concern is that subclasses of BaseDistributedSearchTestCase which attempt to override the solr.xml file used can't (unless they are actually a subclass of AbstractDistribZkTestBase of AbstractFullDistribZkTestBase)

      Attachments

        1. SOLR-7171.patch
          10 kB
          Chris M. Hostetter
        2. SOLR-7171.patch
          7 kB
          Chris M. Hostetter

        Activity

          People

            hossman Chris M. Hostetter
            hossman Chris M. Hostetter
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: