test: don't spin up embedded core if not needed, and close jetty when done

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@927107 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-03-24 16:14:06 +00:00
parent 3d50b42f4c
commit 16cb338474
1 changed files with 9 additions and 0 deletions

View File

@ -36,6 +36,8 @@ import java.util.List;
* @since solr 1.3 * @since solr 1.3
*/ */
public class TestSpellCheckResponse extends SolrExampleTestBase { public class TestSpellCheckResponse extends SolrExampleTestBase {
@Override public String getSchemaFile() { return null; }
@Override public String getSolrConfigFile() { return null; }
SolrServer server; SolrServer server;
JettySolrRunner jetty; JettySolrRunner jetty;
@ -45,6 +47,7 @@ public class TestSpellCheckResponse extends SolrExampleTestBase {
static String field = "name"; static String field = "name";
@Override
public void setUp() throws Exception { public void setUp() throws Exception {
super.setUp(); super.setUp();
@ -55,6 +58,12 @@ public class TestSpellCheckResponse extends SolrExampleTestBase {
server = this.createNewSolrServer(); server = this.createNewSolrServer();
} }
@Override
public void tearDown() throws Exception {
jetty.stop();
super.tearDown();
}
public void testSpellCheckResponse() throws Exception { public void testSpellCheckResponse() throws Exception {
SolrInputDocument doc = new SolrInputDocument(); SolrInputDocument doc = new SolrInputDocument();
doc.setField("id", "111"); doc.setField("id", "111");