org.apache.solr
Class SolrJettyTestBase

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.lucene.util.LuceneTestCase
          extended by org.apache.solr.SolrTestCaseJ4
              extended by org.apache.solr.SolrJettyTestBase
Direct Known Subclasses:
RestTestBase

public abstract class SolrJettyTestBase
extends SolrTestCaseJ4


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.solr.SolrTestCaseJ4
SolrTestCaseJ4.CoreDescriptorBuilder, SolrTestCaseJ4.Doc, SolrTestCaseJ4.Fld, SolrTestCaseJ4.FldType, SolrTestCaseJ4.FVal, SolrTestCaseJ4.IRange, SolrTestCaseJ4.IVals, SolrTestCaseJ4.SVal, SolrTestCaseJ4.Vals, SolrTestCaseJ4.XmlDoc
 
Nested classes/interfaces inherited from class org.apache.lucene.util.LuceneTestCase
org.apache.lucene.util.LuceneTestCase.AwaitsFix, org.apache.lucene.util.LuceneTestCase.BadApple, org.apache.lucene.util.LuceneTestCase.Nightly, org.apache.lucene.util.LuceneTestCase.Slow, org.apache.lucene.util.LuceneTestCase.SuppressCodecs, org.apache.lucene.util.LuceneTestCase.Weekly
 
Field Summary
static String context
           
static org.apache.solr.client.solrj.embedded.JettySolrRunner jetty
           
static int port
           
static org.apache.solr.client.solrj.SolrServer server
           
 
Fields inherited from class org.apache.solr.SolrTestCaseJ4
configString, dataDir, DEFAULT_CONNECTION_TIMEOUT, formatter, h, hdfsDataDir, lrf, ONE_ONE, schemaString, solrClassRules, solrConfig, solrTestRules, testSolrHome, ZERO_ONE, ZERO_TWO
 
Fields inherited from class org.apache.lucene.util.LuceneTestCase
classRules, DEFAULT_LINE_DOCS_FILE, doesntSupportOffsets, INFOSTREAM, JENKINS_LARGE_LINE_DOCS_FILE, OLD_FORMAT_IMPERSONATION_IS_ACTIVE, PREFLEX_IMPERSONATION_IS_ACTIVE, RANDOM_MULTIPLIER, ruleChain, suiteFailureMarker, SYSPROP_AWAITSFIX, SYSPROP_BADAPPLES, SYSPROP_FAILFAST, SYSPROP_MAXFAILURES, SYSPROP_NIGHTLY, SYSPROP_SLOW, SYSPROP_WEEKLY, TEMP_DIR, TEST_AWAITSFIX, TEST_CODEC, TEST_DIRECTORY, TEST_DOCVALUESFORMAT, TEST_LINE_DOCS_FILE, TEST_NIGHTLY, TEST_POSTINGSFORMAT, TEST_SLOW, TEST_THROTTLING, TEST_VERSION_CURRENT, TEST_WEEKLY, VERBOSE
 
Constructor Summary
SolrJettyTestBase()
           
 
Method Summary
static void afterSolrJettyTestBase()
           
static void beforeSolrJettyTestBase()
           
static void cleanUpJettyHome(File solrHome)
           
static org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(String solrHome, String configFile, String context)
           
static org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(String solrHome, String configFile, String schemaFile, String context, boolean stopAtShutdown, SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets)
           
 org.apache.solr.client.solrj.SolrServer createNewSolrServer()
          Create a new solr server.
protected static File getExampleKeystoreFile()
          Returns the File object for the example keystore used when this baseclass randomly uses SSL.
 String getSolrHome()
           
 org.apache.solr.client.solrj.SolrServer getSolrServer()
           
static void setupJettyTestHome(File solrHome, String collection)
           
 
Methods inherited from class org.apache.solr.SolrTestCaseJ4
add, addAndGetVersion, adoc, adoc, assertFailedU, assertFailedU, assertJQ, assertJQ, assertQ, assertQ, assertQEx, assertQEx, assertU, assertU, assertXmlFile, buildCoreDescriptor, clearIndex, commit, copyMinConf, copyMinConf, copyMinFullSetup, copySolrHomeToTemp, createComparator, createComparator, createCore, createCoreContainer, createDefaultCoreContainer, createDoc, createSort, createTempDir, deleteAndGetVersion, deleteByQueryAndGetVersion, deleteCore, delI, delQ, doc, endTrackingSearchers, endTrackingZkClients, getClassName, getFile, getRootCause, getSchemaFile, getSimpleClassName, getSolrConfigFile, hasInitException, hasInitException, ignoreException, indexDocs, initCore, initCore, initCore, initCore, invertField, JQ, json, json, jsonAdd, jsonDelId, jsonDelQ, map, newRandomConfig, optimize, params, postSetUp, preTearDown, recurseDelete, req, req, req, resetExceptionIgnores, resetFactory, sdoc, sdocs, setLoggingLevel, setUp, setupLogging, setupNoCoreTest, startTrackingSearchers, startTrackingZkClients, tearDown, TEST_HOME, toJSON, unIgnoreException, updateJ, useFactory
 
Methods inherited from class org.apache.lucene.util.LuceneTestCase
assertDeletedDocsEquals, assertDocsAndPositionsEnumEquals, assertDocsEnumEquals, assertDocsSkippingEquals, assertDocValuesEquals, assertDocValuesEquals, assertFieldInfosEquals, assertFieldsEquals, assertFieldStatisticsEquals, assertNormsEquals, assertPositionsSkippingEquals, assertReaderEquals, assertReaderStatisticsEquals, assertSaneFieldCaches, assertStoredFieldEquals, assertStoredFieldsEquals, assertTermsEnumEquals, assertTermsEquals, assertTermsStatisticsEquals, assertTermStatsEquals, assertTermVectorsEquals, asSet, assumeFalse, assumeNoException, assumeTrue, atLeast, atLeast, closeAfterSuite, closeAfterTest, defaultCodecSupportsDocsWithField, defaultCodecSupportsDocValues, defaultCodecSupportsSortedSet, dumpArray, dumpIterator, getDataFile, getOnlySegmentReader, getTestClass, getTestName, isTestThread, localeForName, maybeWrapReader, newAlcoholicMergePolicy, newAlcoholicMergePolicy, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newIOContext, newIOContext, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newMergePolicy, newMergePolicy, newMockDirectory, newMockDirectory, newMockFSDirectory, newSearcher, newSearcher, newStringField, newStringField, newTextField, newTextField, newTieredMergePolicy, newTieredMergePolicy, random, randomLocale, randomTimeZone, rarely, rarely, replaceMaxFailureRule, usually, usually
 
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jetty

public static org.apache.solr.client.solrj.embedded.JettySolrRunner jetty

port

public static int port

server

public static org.apache.solr.client.solrj.SolrServer server

context

public static String context
Constructor Detail

SolrJettyTestBase

public SolrJettyTestBase()
Method Detail

getSolrHome

public String getSolrHome()

getExampleKeystoreFile

protected static File getExampleKeystoreFile()
Returns the File object for the example keystore used when this baseclass randomly uses SSL. May be null ifthis test does not appear to be running as part of the standard solr distribution and does not have access to the example configs.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

beforeSolrJettyTestBase

public static void beforeSolrJettyTestBase()
                                    throws Exception
Throws:
Exception

createJetty

public static org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(String solrHome,
                                                                                String configFile,
                                                                                String schemaFile,
                                                                                String context,
                                                                                boolean stopAtShutdown,
                                                                                SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets)
                                                                         throws Exception
Throws:
Exception

createJetty

public static org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(String solrHome,
                                                                                String configFile,
                                                                                String context)
                                                                         throws Exception
Throws:
Exception

afterSolrJettyTestBase

public static void afterSolrJettyTestBase()
                                   throws Exception
Throws:
Exception

getSolrServer

public org.apache.solr.client.solrj.SolrServer getSolrServer()

createNewSolrServer

public org.apache.solr.client.solrj.SolrServer createNewSolrServer()
Create a new solr server. If createJetty was called, an http implementation will be created, otherwise an embedded implementation will be created. Subclasses should override for other options.


setupJettyTestHome

public static void setupJettyTestHome(File solrHome,
                                      String collection)
                               throws Exception
Throws:
Exception

cleanUpJettyHome

public static void cleanUpJettyHome(File solrHome)
                             throws Exception
Throws:
Exception


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.