lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r925614 - /lucene/solr/branches/newtrunk/solr/src/test/org/apache/solr/handler/TestCSVLoader.java
Date Sat, 20 Mar 2010 14:00:38 GMT
Author: rmuir
Date: Sat Mar 20 14:00:37 2010
New Revision: 925614

URL: http://svn.apache.org/viewvc?rev=925614&view=rev
Log:
Convert TestCSVLoader to SolrTestCaseJ4

Modified:
    lucene/solr/branches/newtrunk/solr/src/test/org/apache/solr/handler/TestCSVLoader.java

Modified: lucene/solr/branches/newtrunk/solr/src/test/org/apache/solr/handler/TestCSVLoader.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/newtrunk/solr/src/test/org/apache/solr/handler/TestCSVLoader.java?rev=925614&r1=925613&r2=925614&view=diff
==============================================================================
--- lucene/solr/branches/newtrunk/solr/src/test/org/apache/solr/handler/TestCSVLoader.java
(original)
+++ lucene/solr/branches/newtrunk/solr/src/test/org/apache/solr/handler/TestCSVLoader.java
Sat Mar 20 14:00:37 2010
@@ -17,29 +17,40 @@
 
 package org.apache.solr.handler;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.util.AbstractSolrTestCase;
 import org.apache.solr.request.LocalSolrQueryRequest;
 import org.apache.solr.common.util.ContentStream;
 import org.apache.solr.common.util.ContentStreamBase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 import java.io.*;
 import java.util.List;
 import java.util.ArrayList;
 
-public class TestCSVLoader extends AbstractSolrTestCase {
+public class TestCSVLoader extends SolrTestCaseJ4 {
 
-  public String getSchemaFile() { return "schema12.xml"; }
-  public String getSolrConfigFile() { return "solrconfig.xml"; }
+  @BeforeClass
+  public static void beforeClass() throws Exception {
+    initCore("solrconfig.xml","schema12.xml");
+  }
 
   String filename = "solr_tmp.csv";
   String def_charset = "UTF-8";
   File file = new File(filename);
 
+  @Before
   public void setUp() throws Exception {
     // if you override setUp or tearDown, you better call
     // the super classes version
     super.setUp();
+    cleanup();
   }
+  
+  @After
   public void tearDown() throws Exception {
     // if you override setUp or tearDown, you better call
     // the super classes version
@@ -81,6 +92,7 @@ public class TestCSVLoader extends Abstr
     h.query("/update/csv",req);
   }
 
+  @Test
   public void testCSVLoad() throws Exception {
     makeFile("id\n100\n101\n102");
     loadLocal("stream.file",filename);
@@ -90,6 +102,7 @@ public class TestCSVLoader extends Abstr
     assertQ(req("id:[100 TO 110]"),"//*[@numFound='3']");
   }
 
+  @Test
   public void testCommitFalse() throws Exception {
     makeFile("id\n100\n101\n102");
     loadLocal("stream.file",filename,"commit","false");
@@ -98,12 +111,14 @@ public class TestCSVLoader extends Abstr
     assertQ(req("id:[100 TO 110]"),"//*[@numFound='3']");
   }
 
+  @Test
   public void testCommitTrue() throws Exception {
     makeFile("id\n100\n101\n102");
     loadLocal("stream.file",filename,"commit","true");
     assertQ(req("id:[100 TO 110]"),"//*[@numFound='3']");
   }
 
+  @Test
   public void testCSV() throws Exception {
     lrf.args.put("version","2.0");
     



Mime
View raw message