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

SolrJettyTestBase can no longer be reused by end users

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2.1, 4.3
    • 4.3.1, 4.4, 6.0
    • Tests
    • Java 1.7.0_21, Maven 3.0.3, OS X 10.7.5

    Description

      While trying to use SolrJettyTestBase to build some unit tests for my project I ran into an NPE:

      java.lang.NullPointerException
              at org.apache.solr.util.ExternalPaths.determineSourceHome(ExternalPaths.java:50)
              at org.apache.solr.util.ExternalPaths.<clinit>(ExternalPaths.java:28)
              at org.apache.solr.SolrJettyTestBase.<clinit>(SolrJettyTestBase.java:53)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:266)
              at com.carrotsearch.randomizedtesting.RandomizedRunner$1.run(RandomizedRunner.java:486)
      

      Apparently some changes to SolrJettyTestBase's https support caused it to require the keystore that's distributed with the Solr examples. Specifically the TEST_KEYSTORE static variable triggers a search for SOURCE_HOME in ExternalPaths which throws an NPE if the folder isn't found.

      According to Steve Molloy this used to work in Solr 4.1 and Chris Hostetter confirmed that this is a bug. Ludovic Boutros also reported this in SOLR-4394.

      Attachments

        1. SOLR-4853.patch
          8 kB
          Chris M. Hostetter

        Issue Links

          Activity

            People

              hossman Chris M. Hostetter
              jgibson John Gibson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: