lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r966819 [16/20] - in /lucene/dev/branches/realtime_search: ./ lucene/ lucene/backwards/ lucene/contrib/ lucene/contrib/benchmark/conf/ lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ lucene/contrib/benchmark/src/...
Date Thu, 22 Jul 2010 19:34:52 GMT
Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestClobTransformer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestClobTransformer.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestClobTransformer.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestClobTransformer.java Thu Jul 22 19:34:35 2010
@@ -17,6 +17,8 @@
 package org.apache.solr.handler.dataimport;
 
 import junit.framework.Assert;
+
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Test;
 
 import java.io.StringReader;
@@ -33,7 +35,7 @@ import java.util.*;
  * @see org.apache.solr.handler.dataimport.ClobTransformer
  * @since solr 1.4
  */
-public class TestClobTransformer {
+public class TestClobTransformer extends SolrTestCaseJ4 {
   @Test
   public void simple() throws Exception {
     List<Map<String, String>> flds = new ArrayList<Map<String, String>>();
@@ -43,7 +45,7 @@ public class TestClobTransformer {
     f.put(ClobTransformer.CLOB, "true");
     f.put(DataImporter.NAME, "description");
     flds.add(f);
-    Context ctx = AbstractDataImportHandlerTest.getContext(null, new VariableResolverImpl(), null, Context.FULL_DUMP, flds, Collections.EMPTY_MAP);
+    Context ctx = AbstractDataImportHandlerTestCase.getContext(null, new VariableResolverImpl(), null, Context.FULL_DUMP, flds, Collections.EMPTY_MAP);
     Transformer t = new ClobTransformer();
     Map<String, Object> row = new HashMap<String, Object>();
     Clob clob = (Clob) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[]{Clob.class}, new InvocationHandler() {

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDataConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDataConfig.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDataConfig.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDataConfig.java Thu Jul 22 19:34:35 2010
@@ -33,7 +33,7 @@ import java.util.List;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestDataConfig extends AbstractDataImportHandlerTest {
+public class TestDataConfig extends AbstractDataImportHandlerTestCase {
 
   @Override
   public void setUp() throws Exception {

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDateFormatTransformer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDateFormatTransformer.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDateFormatTransformer.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDateFormatTransformer.java Thu Jul 22 19:34:35 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.handler.dataimport;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -30,28 +31,28 @@ import java.util.*;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestDateFormatTransformer {
+public class TestDateFormatTransformer extends SolrTestCaseJ4 {
 
   @Test
   @SuppressWarnings("unchecked")
   public void testTransformRow_SingleRow() throws Exception {
     List fields = new ArrayList();
-    fields.add(AbstractDataImportHandlerTest.createMap(DataImporter.COLUMN,
+    fields.add(AbstractDataImportHandlerTestCase.createMap(DataImporter.COLUMN,
             "lastModified"));
-    fields.add(AbstractDataImportHandlerTest.createMap(DataImporter.COLUMN,
+    fields.add(AbstractDataImportHandlerTestCase.createMap(DataImporter.COLUMN,
             "dateAdded", RegexTransformer.SRC_COL_NAME, "lastModified",
             DateFormatTransformer.DATE_TIME_FMT, "MM/dd/yyyy"));
 
     SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy");
     Date now = format.parse(format.format(new Date()));
 
-    Map row = AbstractDataImportHandlerTest.createMap("lastModified", format
+    Map row = AbstractDataImportHandlerTestCase.createMap("lastModified", format
             .format(now));
 
     VariableResolverImpl resolver = new VariableResolverImpl();
     resolver.addNamespace("e", row);
 
-    Context context = AbstractDataImportHandlerTest.getContext(null, resolver,
+    Context context = AbstractDataImportHandlerTestCase.getContext(null, resolver,
             null, Context.FULL_DUMP, fields, null);
     new DateFormatTransformer().transformRow(row, context);
     Assert.assertEquals(now, row.get("dateAdded"));
@@ -61,9 +62,9 @@ public class TestDateFormatTransformer {
   @SuppressWarnings("unchecked")
   public void testTransformRow_MultipleRows() throws Exception {
     List fields = new ArrayList();
-    fields.add(AbstractDataImportHandlerTest.createMap(DataImporter.COLUMN,
+    fields.add(AbstractDataImportHandlerTestCase.createMap(DataImporter.COLUMN,
             "lastModified"));
-    fields.add(AbstractDataImportHandlerTest.createMap(DataImporter.COLUMN,
+    fields.add(AbstractDataImportHandlerTestCase.createMap(DataImporter.COLUMN,
             "dateAdded", RegexTransformer.SRC_COL_NAME, "lastModified",
             DateFormatTransformer.DATE_TIME_FMT, "MM/dd/yyyy hh:mm:ss.SSS"));
 
@@ -80,7 +81,7 @@ public class TestDateFormatTransformer {
     VariableResolverImpl resolver = new VariableResolverImpl();
     resolver.addNamespace("e", row);
 
-    Context context = AbstractDataImportHandlerTest.getContext(null, resolver,
+    Context context = AbstractDataImportHandlerTestCase.getContext(null, resolver,
             null, Context.FULL_DUMP, fields, null);
     new DateFormatTransformer().transformRow(row, context);
     List output = new ArrayList();

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java Thu Jul 22 19:34:35 2010
@@ -16,8 +16,9 @@
  */
 package org.apache.solr.handler.dataimport;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrInputDocument;
-import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTest.createMap;
+import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTestCase.createMap;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -31,7 +32,7 @@ import java.util.*;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestDocBuilder {
+public class TestDocBuilder extends SolrTestCaseJ4 {
 
   @Test
   public void loadClass() throws Exception {

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder2.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder2.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder2.java Thu Jul 22 19:34:35 2010
@@ -36,7 +36,7 @@ import java.io.File;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestDocBuilder2 extends AbstractDataImportHandlerTest {
+public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
 
   @Before
   public void setUp() throws Exception {

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEntityProcessorBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEntityProcessorBase.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEntityProcessorBase.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEntityProcessorBase.java Thu Jul 22 19:34:35 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.handler.dataimport;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -32,7 +33,7 @@ import java.util.Map;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestEntityProcessorBase {
+public class TestEntityProcessorBase extends SolrTestCaseJ4 {
 
   @Test
   public void multiTransformer() {
@@ -43,7 +44,7 @@ public class TestEntityProcessorBase {
     fields.add(TestRegexTransformer.getField("A", null, null, null, null));
     fields.add(TestRegexTransformer.getField("B", null, null, null, null));
 
-    Context context = AbstractDataImportHandlerTest.getContext(null, null, new MockDataSource(), Context.FULL_DUMP,
+    Context context = AbstractDataImportHandlerTestCase.getContext(null, null, new MockDataSource(), Context.FULL_DUMP,
             fields, entity);
     Map<String, Object> src = new HashMap<String, Object>();
     src.put("A", "NA");

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestErrorHandling.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestErrorHandling.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestErrorHandling.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestErrorHandling.java Thu Jul 22 19:34:35 2010
@@ -29,7 +29,7 @@ import java.util.Properties;
  * @version $Id$
  * @since solr 1.4
  */
-public class TestErrorHandling extends AbstractDataImportHandlerTest {
+public class TestErrorHandling extends AbstractDataImportHandlerTestCase {
 
   public void testMalformedStreamingXml() throws Exception {
     StringDataSource.xml = malformedXml;

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEvaluatorBag.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEvaluatorBag.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEvaluatorBag.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEvaluatorBag.java Thu Jul 22 19:34:35 2010
@@ -17,8 +17,9 @@
 package org.apache.solr.handler.dataimport;
 
 import static org.junit.Assert.assertEquals;
+
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import java.net.URLEncoder;
@@ -33,7 +34,7 @@ import junit.framework.Assert;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestEvaluatorBag {
+public class TestEvaluatorBag extends SolrTestCaseJ4 {
   private static final String ENCODING = "UTF-8";
 
   VariableResolverImpl resolver;
@@ -44,6 +45,7 @@ public class TestEvaluatorBag {
 
   @Before
   public void setUp() throws Exception {
+    super.setUp();
     resolver = new VariableResolverImpl();
 
     sqlTests = new HashMap<String, String>();

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestFieldReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestFieldReader.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestFieldReader.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestFieldReader.java Thu Jul 22 19:34:35 2010
@@ -17,11 +17,12 @@
 package org.apache.solr.handler.dataimport;
 
 import junit.framework.Assert;
-import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTest.createMap;
+import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTestCase.createMap;
+
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Test;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -32,7 +33,7 @@ import java.util.Map;
  * @see org.apache.solr.handler.dataimport.FieldReaderDataSource
  * @since 1.4
  */
-public class TestFieldReader {
+public class TestFieldReader extends SolrTestCaseJ4 {
 
   @Test
   public void simple() {

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java Thu Jul 22 19:34:35 2010
@@ -16,6 +16,7 @@ package org.apache.solr.handler.dataimpo
  * limitations under the License.
  */
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -32,7 +33,7 @@ import java.util.*;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestFileListEntityProcessor {
+public class TestFileListEntityProcessor extends SolrTestCaseJ4 {
 
   @Test
   @SuppressWarnings("unchecked")
@@ -44,10 +45,10 @@ public class TestFileListEntityProcessor
     createFile(tmpdir, "a.xml", "a.xml".getBytes(), false);
     createFile(tmpdir, "b.xml", "b.xml".getBytes(), false);
     createFile(tmpdir, "c.props", "c.props".getBytes(), false);
-    Map attrs = AbstractDataImportHandlerTest.createMap(
+    Map attrs = AbstractDataImportHandlerTestCase.createMap(
             FileListEntityProcessor.FILE_NAME, "xml$",
             FileListEntityProcessor.BASE_DIR, tmpdir.getAbsolutePath());
-    Context c = AbstractDataImportHandlerTest.getContext(null,
+    Context c = AbstractDataImportHandlerTestCase.getContext(null,
             new VariableResolverImpl(), null, Context.FULL_DUMP, Collections.EMPTY_LIST, attrs);
     FileListEntityProcessor fileListEntityProcessor = new FileListEntityProcessor();
     fileListEntityProcessor.init(c);
@@ -87,7 +88,7 @@ public class TestFileListEntityProcessor
       minLength = content.length;
       smallestFile = "c.props";
     }
-    Map attrs = AbstractDataImportHandlerTest.createMap(
+    Map attrs = AbstractDataImportHandlerTestCase.createMap(
             FileListEntityProcessor.FILE_NAME, ".*",
             FileListEntityProcessor.BASE_DIR, tmpdir.getAbsolutePath(),
             FileListEntityProcessor.BIGGER_THAN, String.valueOf(minLength));
@@ -97,7 +98,7 @@ public class TestFileListEntityProcessor
     l.add(new File(tmpdir, "a.xml").getAbsolutePath());
     l.add(new File(tmpdir, "b.xml").getAbsolutePath());
     Assert.assertEquals(l, new HashSet<String>(fList));
-    attrs = AbstractDataImportHandlerTest.createMap(
+    attrs = AbstractDataImportHandlerTestCase.createMap(
             FileListEntityProcessor.FILE_NAME, ".*",
             FileListEntityProcessor.BASE_DIR, tmpdir.getAbsolutePath(),
             FileListEntityProcessor.SMALLER_THAN, String.valueOf(minLength+1));
@@ -105,19 +106,19 @@ public class TestFileListEntityProcessor
     l.clear();
     l.add(new File(tmpdir, smallestFile).getAbsolutePath());
     Assert.assertEquals(l, new HashSet<String>(fList));
-    attrs = AbstractDataImportHandlerTest.createMap(
+    attrs = AbstractDataImportHandlerTestCase.createMap(
             FileListEntityProcessor.FILE_NAME, ".*",
             FileListEntityProcessor.BASE_DIR, tmpdir.getAbsolutePath(),
             FileListEntityProcessor.SMALLER_THAN, "${a.x}");
     VariableResolverImpl resolver = new VariableResolverImpl();
-    resolver.addNamespace("a", AbstractDataImportHandlerTest.createMap("x", "4"));
+    resolver.addNamespace("a", AbstractDataImportHandlerTestCase.createMap("x", "4"));
     fList = getFiles(resolver, attrs);
     Assert.assertEquals(l, new HashSet<String>(fList));
   }
 
   @SuppressWarnings("unchecked")
   static List<String> getFiles(VariableResolverImpl resolver, Map attrs) {
-    Context c = AbstractDataImportHandlerTest.getContext(null,
+    Context c = AbstractDataImportHandlerTestCase.getContext(null,
             resolver, null, Context.FULL_DUMP, Collections.EMPTY_LIST, attrs);
     FileListEntityProcessor fileListEntityProcessor = new FileListEntityProcessor();
     fileListEntityProcessor.init(c);
@@ -140,13 +141,13 @@ public class TestFileListEntityProcessor
     createFile(tmpdir, "a.xml", "a.xml".getBytes(), true);
     createFile(tmpdir, "b.xml", "b.xml".getBytes(), true);
     createFile(tmpdir, "c.props", "c.props".getBytes(), true);
-    Map attrs = AbstractDataImportHandlerTest.createMap(
+    Map attrs = AbstractDataImportHandlerTestCase.createMap(
             FileListEntityProcessor.FILE_NAME, "xml$",
             FileListEntityProcessor.BASE_DIR, tmpdir.getAbsolutePath(),
             FileListEntityProcessor.OLDER_THAN, "'NOW'");
     List<String> fList = getFiles(null, attrs);
     Assert.assertEquals(2, fList.size());
-    attrs = AbstractDataImportHandlerTest.createMap(
+    attrs = AbstractDataImportHandlerTestCase.createMap(
             FileListEntityProcessor.FILE_NAME, ".xml$",
             FileListEntityProcessor.BASE_DIR, tmpdir.getAbsolutePath(),
             FileListEntityProcessor.NEWER_THAN, "'NOW-2HOURS'");
@@ -154,13 +155,13 @@ public class TestFileListEntityProcessor
     Assert.assertEquals(2, fList.size());
 
     // Use a variable for newerThan
-    attrs = AbstractDataImportHandlerTest.createMap(
+    attrs = AbstractDataImportHandlerTestCase.createMap(
             FileListEntityProcessor.FILE_NAME, ".xml$",
             FileListEntityProcessor.BASE_DIR, tmpdir.getAbsolutePath(),
             FileListEntityProcessor.NEWER_THAN, "${a.x}");
     VariableResolverImpl resolver = new VariableResolverImpl();
     String lastMod = DataImporter.DATE_TIME_FORMAT.get().format(new Date(System.currentTimeMillis() - 50000));
-    resolver.addNamespace("a", AbstractDataImportHandlerTest.createMap("x", lastMod));
+    resolver.addNamespace("a", AbstractDataImportHandlerTestCase.createMap("x", lastMod));
     createFile(tmpdir, "t.xml", "t.xml".getBytes(), false);
     fList = getFiles(resolver, attrs);
     Assert.assertEquals(1, fList.size());
@@ -179,7 +180,7 @@ public class TestFileListEntityProcessor
     createFile(childdir, "a.xml", "a.xml".getBytes(), true);
     createFile(childdir, "b.xml", "b.xml".getBytes(), true);
     createFile(childdir, "c.props", "c.props".getBytes(), true);
-    Map attrs = AbstractDataImportHandlerTest.createMap(
+    Map attrs = AbstractDataImportHandlerTestCase.createMap(
             FileListEntityProcessor.FILE_NAME, "^.*\\.xml$",
             FileListEntityProcessor.BASE_DIR, childdir.getAbsolutePath(),
             FileListEntityProcessor.RECURSIVE, "true");

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestJdbcDataSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestJdbcDataSource.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestJdbcDataSource.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestJdbcDataSource.java Thu Jul 22 19:34:35 2010
@@ -23,6 +23,7 @@ import java.util.*;
 
 import javax.sql.DataSource;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.easymock.EasyMock;
 import org.easymock.IMocksControl;
 import org.junit.*;
@@ -39,7 +40,7 @@ import org.junit.*;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestJdbcDataSource {
+public class TestJdbcDataSource extends SolrTestCaseJ4 {
   Driver driver;
   DataSource dataSource;
   Connection connection;
@@ -47,7 +48,7 @@ public class TestJdbcDataSource {
   JdbcDataSource jdbcDataSource = new JdbcDataSource();
   List<Map<String, String>> fields = new ArrayList<Map<String, String>>();
 
-  Context context = AbstractDataImportHandlerTest.getContext(null, null,
+  Context context = AbstractDataImportHandlerTestCase.getContext(null, null,
           jdbcDataSource, Context.FULL_DUMP, fields, null);
 
   Properties props = new Properties();
@@ -55,7 +56,8 @@ public class TestJdbcDataSource {
   String sysProp = System.getProperty("java.naming.factory.initial");
 
   @Before
-  public void SetUp() throws ClassNotFoundException {
+  public void setUp() throws Exception {
+    super.setUp();
     System.setProperty("java.naming.factory.initial",
             MockInitialContextFactory.class.getName());
 
@@ -66,12 +68,13 @@ public class TestJdbcDataSource {
   }
 
   @After
-  public void tearDown() {
+  public void tearDown() throws Exception {
     if (sysProp == null) {
       System.getProperties().remove("java.naming.factory.initial");
     } else {
       System.setProperty("java.naming.factory.initial", sysProp);
     }
+    super.tearDown();
   }
 
   @Test
@@ -161,7 +164,7 @@ public class TestJdbcDataSource {
     f.put("type", "float");
     flds.add(f);
 
-    Context c = AbstractDataImportHandlerTest.getContext(null, null,
+    Context c = AbstractDataImportHandlerTestCase.getContext(null, null,
             dataSource, Context.FULL_DUMP, flds, null);
     dataSource.init(c, p);
     Iterator<Map<String, Object>> i = dataSource

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java Thu Jul 22 19:34:35 2010
@@ -16,6 +16,7 @@ package org.apache.solr.handler.dataimpo
  * limitations under the License.
  */
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -31,7 +32,7 @@ import java.util.*;
  * @version $Id$
  * @since solr 1.4
  */
-public class TestLineEntityProcessor {
+public class TestLineEntityProcessor extends SolrTestCaseJ4 {
 
   @Test
   /************************************************************************/
@@ -44,13 +45,13 @@ public class TestLineEntityProcessor {
      *           />
      */
 
-    Map attrs = AbstractDataImportHandlerTest.createMap(
+    Map attrs = AbstractDataImportHandlerTestCase.createMap(
             LineEntityProcessor.URL, "dummy.lis",
             LineEntityProcessor.ACCEPT_LINE_REGEX, null,
             LineEntityProcessor.SKIP_LINE_REGEX, null
     );
 
-    Context c = AbstractDataImportHandlerTest.getContext(
+    Context c = AbstractDataImportHandlerTestCase.getContext(
             null,                          //parentEntity
             new VariableResolverImpl(),  //resolver
             getDataSource(filecontents),   //parentDataSource
@@ -84,13 +85,13 @@ public class TestLineEntityProcessor {
      *           acceptLineRegex="xml"
      *           />
      */
-    Map attrs = AbstractDataImportHandlerTest.createMap(
+    Map attrs = AbstractDataImportHandlerTestCase.createMap(
             LineEntityProcessor.URL, "dummy.lis",
             LineEntityProcessor.ACCEPT_LINE_REGEX, "xml",
             LineEntityProcessor.SKIP_LINE_REGEX, null
     );
 
-    Context c = AbstractDataImportHandlerTest.getContext(
+    Context c = AbstractDataImportHandlerTestCase.getContext(
             null,                          //parentEntity
             new VariableResolverImpl(),  //resolver
             getDataSource(filecontents),   //parentDataSource
@@ -122,13 +123,13 @@ public class TestLineEntityProcessor {
      *           omitLineRegex="\\.xsd"
      *           />
      */
-    Map attrs = AbstractDataImportHandlerTest.createMap(
+    Map attrs = AbstractDataImportHandlerTestCase.createMap(
             LineEntityProcessor.URL, "dummy.lis",
             LineEntityProcessor.ACCEPT_LINE_REGEX, "\\.xml",
             LineEntityProcessor.SKIP_LINE_REGEX, "\\.xsd"
     );
 
-    Context c = AbstractDataImportHandlerTest.getContext(
+    Context c = AbstractDataImportHandlerTestCase.getContext(
             null,                          //parentEntity
             new VariableResolverImpl(),  //resolver
             getDataSource(filecontents),   //parentDataSource
@@ -159,12 +160,12 @@ public class TestLineEntityProcessor {
      *           omitLineRegex="\\.xsd"
      *           />
      */
-    Map attrs = AbstractDataImportHandlerTest.createMap(
+    Map attrs = AbstractDataImportHandlerTestCase.createMap(
             LineEntityProcessor.URL, "dummy.lis",
             LineEntityProcessor.SKIP_LINE_REGEX, "\\.xsd"
     );
 
-    Context c = AbstractDataImportHandlerTest.getContext(
+    Context c = AbstractDataImportHandlerTestCase.getContext(
             null,                          //parentEntity
             new VariableResolverImpl(),  //resolver
             getDataSource(filecontents),   //parentDataSource

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestNumberFormatTransformer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestNumberFormatTransformer.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestNumberFormatTransformer.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestNumberFormatTransformer.java Thu Jul 22 19:34:35 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.handler.dataimport;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -33,7 +34,7 @@ import java.util.Map;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestNumberFormatTransformer {
+public class TestNumberFormatTransformer extends SolrTestCaseJ4 {
   private char GROUPING_SEP = new DecimalFormatSymbols().getGroupingSeparator();
   private char DECIMAL_SEP = new DecimalFormatSymbols().getDecimalSeparator();
 
@@ -42,12 +43,12 @@ public class TestNumberFormatTransformer
   public void testTransformRow_SingleNumber() {
     char GERMAN_GROUPING_SEP = new DecimalFormatSymbols(Locale.GERMANY).getGroupingSeparator();
     List l = new ArrayList();
-    l.add(AbstractDataImportHandlerTest.createMap("column", "num",
+    l.add(AbstractDataImportHandlerTestCase.createMap("column", "num",
             NumberFormatTransformer.FORMAT_STYLE, NumberFormatTransformer.NUMBER));
-    l.add(AbstractDataImportHandlerTest.createMap("column", "localizedNum",
+    l.add(AbstractDataImportHandlerTestCase.createMap("column", "localizedNum",
             NumberFormatTransformer.FORMAT_STYLE, NumberFormatTransformer.NUMBER, NumberFormatTransformer.LOCALE, "de-DE"));
-    Context c = AbstractDataImportHandlerTest.getContext(null, null, null, Context.FULL_DUMP, l, null);
-    Map m = AbstractDataImportHandlerTest.createMap("num", "123" + GROUPING_SEP + "567", "localizedNum", "123" + GERMAN_GROUPING_SEP + "567");
+    Context c = AbstractDataImportHandlerTestCase.getContext(null, null, null, Context.FULL_DUMP, l, null);
+    Map m = AbstractDataImportHandlerTestCase.createMap("num", "123" + GROUPING_SEP + "567", "localizedNum", "123" + GERMAN_GROUPING_SEP + "567");
     new NumberFormatTransformer().transformRow(m, c);
     Assert.assertEquals(new Long(123567), m.get("num"));
     Assert.assertEquals(new Long(123567), m.get("localizedNum"));
@@ -57,27 +58,27 @@ public class TestNumberFormatTransformer
   @SuppressWarnings("unchecked")
   public void testTransformRow_MultipleNumbers() throws Exception {
     List fields = new ArrayList();
-    fields.add(AbstractDataImportHandlerTest.createMap(DataImporter.COLUMN,
+    fields.add(AbstractDataImportHandlerTestCase.createMap(DataImporter.COLUMN,
             "inputs"));
-    fields.add(AbstractDataImportHandlerTest.createMap(DataImporter.COLUMN,
+    fields.add(AbstractDataImportHandlerTestCase.createMap(DataImporter.COLUMN,
             "outputs", RegexTransformer.SRC_COL_NAME, "inputs",
             NumberFormatTransformer.FORMAT_STYLE, NumberFormatTransformer.NUMBER));
 
     List inputs = new ArrayList();
     inputs.add("123" + GROUPING_SEP + "567");
     inputs.add("245" + GROUPING_SEP + "678");
-    Map row = AbstractDataImportHandlerTest.createMap("inputs", inputs);
+    Map row = AbstractDataImportHandlerTestCase.createMap("inputs", inputs);
 
     VariableResolverImpl resolver = new VariableResolverImpl();
     resolver.addNamespace("e", row);
 
-    Context context = AbstractDataImportHandlerTest.getContext(null, resolver, null, Context.FULL_DUMP, fields, null);
+    Context context = AbstractDataImportHandlerTestCase.getContext(null, resolver, null, Context.FULL_DUMP, fields, null);
     new NumberFormatTransformer().transformRow(row, context);
 
     List output = new ArrayList();
     output.add(new Long(123567));
     output.add(new Long(245678));
-    Map outputRow = AbstractDataImportHandlerTest.createMap("inputs", inputs,
+    Map outputRow = AbstractDataImportHandlerTestCase.createMap("inputs", inputs,
             "outputs", output);
 
     Assert.assertEquals(outputRow, row);
@@ -87,10 +88,10 @@ public class TestNumberFormatTransformer
   @SuppressWarnings("unchecked")
   public void testTransformRow_InvalidInput1_Number() {
     List l = new ArrayList();
-    l.add(AbstractDataImportHandlerTest.createMap("column", "num",
+    l.add(AbstractDataImportHandlerTestCase.createMap("column", "num",
             NumberFormatTransformer.FORMAT_STYLE, NumberFormatTransformer.NUMBER));
-    Context c = AbstractDataImportHandlerTest.getContext(null, null, null, Context.FULL_DUMP, l, null);
-    Map m = AbstractDataImportHandlerTest.createMap("num", "123" + GROUPING_SEP + "5a67");
+    Context c = AbstractDataImportHandlerTestCase.getContext(null, null, null, Context.FULL_DUMP, l, null);
+    Map m = AbstractDataImportHandlerTestCase.createMap("num", "123" + GROUPING_SEP + "5a67");
     new NumberFormatTransformer().transformRow(m, c);
   }
 
@@ -98,10 +99,10 @@ public class TestNumberFormatTransformer
   @SuppressWarnings("unchecked")
   public void testTransformRow_InvalidInput2_Number() {
     List l = new ArrayList();
-    l.add(AbstractDataImportHandlerTest.createMap("column", "num",
+    l.add(AbstractDataImportHandlerTestCase.createMap("column", "num",
             NumberFormatTransformer.FORMAT_STYLE, NumberFormatTransformer.NUMBER));
-    Context c = AbstractDataImportHandlerTest.getContext(null, null, null, Context.FULL_DUMP, l, null);
-    Map m = AbstractDataImportHandlerTest.createMap("num", "123" + GROUPING_SEP + "567b");
+    Context c = AbstractDataImportHandlerTestCase.getContext(null, null, null, Context.FULL_DUMP, l, null);
+    Map m = AbstractDataImportHandlerTestCase.createMap("num", "123" + GROUPING_SEP + "567b");
     new NumberFormatTransformer().transformRow(m, c);
   }
 
@@ -109,10 +110,10 @@ public class TestNumberFormatTransformer
   @SuppressWarnings("unchecked")
   public void testTransformRow_InvalidInput2_Currency() {
     List l = new ArrayList();
-    l.add(AbstractDataImportHandlerTest.createMap("column", "num",
+    l.add(AbstractDataImportHandlerTestCase.createMap("column", "num",
             NumberFormatTransformer.FORMAT_STYLE, NumberFormatTransformer.CURRENCY));
-    Context c = AbstractDataImportHandlerTest.getContext(null, null, null, Context.FULL_DUMP, l, null);
-    Map m = AbstractDataImportHandlerTest.createMap("num", "123" + GROUPING_SEP + "567b");
+    Context c = AbstractDataImportHandlerTestCase.getContext(null, null, null, Context.FULL_DUMP, l, null);
+    Map m = AbstractDataImportHandlerTestCase.createMap("num", "123" + GROUPING_SEP + "567b");
     new NumberFormatTransformer().transformRow(m, c);
   }
 
@@ -120,10 +121,10 @@ public class TestNumberFormatTransformer
   @SuppressWarnings("unchecked")
   public void testTransformRow_InvalidInput1_Percent() {
     List l = new ArrayList();
-    l.add(AbstractDataImportHandlerTest.createMap("column", "num",
+    l.add(AbstractDataImportHandlerTestCase.createMap("column", "num",
             NumberFormatTransformer.FORMAT_STYLE, NumberFormatTransformer.PERCENT));
-    Context c = AbstractDataImportHandlerTest.getContext(null, null, null, Context.FULL_DUMP, l, null);
-    Map m = AbstractDataImportHandlerTest.createMap("num", "123" + GROUPING_SEP + "5a67");
+    Context c = AbstractDataImportHandlerTestCase.getContext(null, null, null, Context.FULL_DUMP, l, null);
+    Map m = AbstractDataImportHandlerTestCase.createMap("num", "123" + GROUPING_SEP + "5a67");
     new NumberFormatTransformer().transformRow(m, c);
   }
 
@@ -131,10 +132,10 @@ public class TestNumberFormatTransformer
   @SuppressWarnings("unchecked")
   public void testTransformRow_InvalidInput3_Currency() {
     List l = new ArrayList();
-    l.add(AbstractDataImportHandlerTest.createMap("column", "num",
+    l.add(AbstractDataImportHandlerTestCase.createMap("column", "num",
             NumberFormatTransformer.FORMAT_STYLE, NumberFormatTransformer.CURRENCY));
-    Context c = AbstractDataImportHandlerTest.getContext(null, null, null, Context.FULL_DUMP, l, null);
-    Map m = AbstractDataImportHandlerTest.createMap(
+    Context c = AbstractDataImportHandlerTestCase.getContext(null, null, null, Context.FULL_DUMP, l, null);
+    Map m = AbstractDataImportHandlerTestCase.createMap(
             "num", "123" + DECIMAL_SEP + "456" + DECIMAL_SEP + "789");
     new NumberFormatTransformer().transformRow(m, c);
   }
@@ -143,10 +144,10 @@ public class TestNumberFormatTransformer
   @SuppressWarnings("unchecked")
   public void testTransformRow_InvalidInput3_Number() {
     List l = new ArrayList();
-    l.add(AbstractDataImportHandlerTest.createMap("column", "num",
+    l.add(AbstractDataImportHandlerTestCase.createMap("column", "num",
             NumberFormatTransformer.FORMAT_STYLE, NumberFormatTransformer.NUMBER));
-    Context c = AbstractDataImportHandlerTest.getContext(null, null, null, Context.FULL_DUMP, l, null);
-    Map m = AbstractDataImportHandlerTest.createMap(
+    Context c = AbstractDataImportHandlerTestCase.getContext(null, null, null, Context.FULL_DUMP, l, null);
+    Map m = AbstractDataImportHandlerTestCase.createMap(
             "num", "123" + DECIMAL_SEP + "456" + DECIMAL_SEP + "789");
     new NumberFormatTransformer().transformRow(m, c);
   }
@@ -155,10 +156,10 @@ public class TestNumberFormatTransformer
   @SuppressWarnings("unchecked")
   public void testTransformRow_MalformedInput_Number() {
     List l = new ArrayList();
-    l.add(AbstractDataImportHandlerTest.createMap("column", "num",
+    l.add(AbstractDataImportHandlerTestCase.createMap("column", "num",
             NumberFormatTransformer.FORMAT_STYLE, NumberFormatTransformer.NUMBER));
-    Context c = AbstractDataImportHandlerTest.getContext(null, null, null, Context.FULL_DUMP, l, null);
-    Map m = AbstractDataImportHandlerTest.createMap(
+    Context c = AbstractDataImportHandlerTestCase.getContext(null, null, null, Context.FULL_DUMP, l, null);
+    Map m = AbstractDataImportHandlerTestCase.createMap(
             "num", "123" + GROUPING_SEP + GROUPING_SEP + "789");
     new NumberFormatTransformer().transformRow(m, c);
     Assert.assertEquals(new Long(123789), m.get("num"));

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java Thu Jul 22 19:34:35 2010
@@ -17,7 +17,9 @@
 package org.apache.solr.handler.dataimport;
 
 import junit.framework.Assert;
-import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTest.createMap;
+import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTestCase.createMap;
+
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Test;
 
 import java.io.StringReader;
@@ -30,7 +32,7 @@ import java.util.Properties;
  * @see org.apache.solr.handler.dataimport.PlainTextEntityProcessor
  * @since solr 1.4
  */
-public class TestPlainTextEntityProcessor {
+public class TestPlainTextEntityProcessor extends SolrTestCaseJ4 {
   @Test
   public void simple() {
     DataImporter di = new DataImporter();

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestRegexTransformer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestRegexTransformer.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestRegexTransformer.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestRegexTransformer.java Thu Jul 22 19:34:35 2010
@@ -20,8 +20,10 @@ import static org.apache.solr.handler.da
 import static org.apache.solr.handler.dataimport.RegexTransformer.GROUP_NAMES;
 import static org.apache.solr.handler.dataimport.RegexTransformer.REPLACE_WITH;
 import static org.apache.solr.handler.dataimport.DataImporter.COLUMN;
-import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTest.createMap;
-import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTest.getContext;
+import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTestCase.createMap;
+import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTestCase.getContext;
+
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -36,14 +38,14 @@ import java.util.Map;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestRegexTransformer {
+public class TestRegexTransformer extends SolrTestCaseJ4 {
 
   @Test
   public void commaSeparated() {
     List<Map<String, String>> fields = new ArrayList<Map<String, String>>();
     // <field column="col1" sourceColName="a" splitBy="," />
     fields.add(getField("col1", "string", null, "a", ","));
-    Context context = AbstractDataImportHandlerTest.getContext(null, null, null, Context.FULL_DUMP, fields, null);
+    Context context = AbstractDataImportHandlerTestCase.getContext(null, null, null, Context.FULL_DUMP, fields, null);
 
     Map<String, Object> src = new HashMap<String, Object>();
     src.put("a", "a,bb,cc,d");
@@ -63,7 +65,7 @@ public class TestRegexTransformer {
     m.put(GROUP_NAMES,",firstName,lastName");
     m.put(REGEX,"(\\w*) (\\w*) (\\w*)");
     fields.add(m);
-    Context context = AbstractDataImportHandlerTest.getContext(null, null, null, Context.FULL_DUMP, fields, null);
+    Context context = AbstractDataImportHandlerTestCase.getContext(null, null, null, Context.FULL_DUMP, fields, null);
     Map<String, Object> src = new HashMap<String, Object>();
     src.put("fullName", "Mr Noble Paul");
 
@@ -91,7 +93,7 @@ public class TestRegexTransformer {
     Map<String, String> fld = getField("name", "string", "'", null, null);
     fld.put(REPLACE_WITH, "''");
     fields.add(fld);
-    Context context = AbstractDataImportHandlerTest.getContext(null, null,
+    Context context = AbstractDataImportHandlerTestCase.getContext(null, null,
             null, Context.FULL_DUMP, fields, null);
 
     Map<String, Object> src = new HashMap<String, Object>();
@@ -139,8 +141,8 @@ public class TestRegexTransformer {
 
     VariableResolverImpl resolver = new VariableResolverImpl();
     resolver.addNamespace("e", row);
-    Map<String, String> eAttrs = AbstractDataImportHandlerTest.createMap("name", "e");
-    Context context = AbstractDataImportHandlerTest.getContext(null, resolver, null, Context.FULL_DUMP, fields, eAttrs);
+    Map<String, String> eAttrs = AbstractDataImportHandlerTestCase.createMap("name", "e");
+    Context context = AbstractDataImportHandlerTestCase.getContext(null, resolver, null, Context.FULL_DUMP, fields, eAttrs);
 
     Map<String, Object> result = new RegexTransformer().transformRow(row, context);
     Assert.assertEquals(5, result.size());

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestScriptTransformer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestScriptTransformer.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestScriptTransformer.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestScriptTransformer.java Thu Jul 22 19:34:35 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.handler.dataimport;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -42,7 +43,7 @@ import java.util.Map;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestScriptTransformer {
+public class TestScriptTransformer extends SolrTestCaseJ4 {
 
   @Test
   @Ignore
@@ -65,7 +66,7 @@ public class TestScriptTransformer {
     entity.put("name", "hello");
     entity.put("transformer", "script:" + funcName);
 
-    AbstractDataImportHandlerTest.TestContext context = AbstractDataImportHandlerTest.getContext(null, null, null,
+    AbstractDataImportHandlerTestCase.TestContext context = AbstractDataImportHandlerTestCase.getContext(null, null, null,
             Context.FULL_DUMP, fields, entity);
     context.script = script;
     context.scriptlang = "JavaScript";

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor.java Thu Jul 22 19:34:35 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.handler.dataimport;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -29,7 +30,7 @@ import java.util.*;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestSqlEntityProcessor {
+public class TestSqlEntityProcessor extends SolrTestCaseJ4 {
   private static ThreadLocal<Integer> local = new ThreadLocal<Integer>();
 
   @Test
@@ -39,7 +40,7 @@ public class TestSqlEntityProcessor {
     VariableResolverImpl vr = new VariableResolverImpl();
     HashMap<String, String> ea = new HashMap<String, String>();
     ea.put("query", "SELECT * FROM A");
-    Context c = AbstractDataImportHandlerTest.getContext(null, vr, getDs(rows),
+    Context c = AbstractDataImportHandlerTestCase.getContext(null, vr, getDs(rows),
             Context.FULL_DUMP, null, ea);
     sep.init(c);
     int count = 0;
@@ -62,7 +63,7 @@ public class TestSqlEntityProcessor {
     ea.put("query", "SELECT * FROM A");
     ea.put("transformer", T.class.getName());
 
-    sep.init(AbstractDataImportHandlerTest.getContext(null, vr, getDs(rows),
+    sep.init(AbstractDataImportHandlerTestCase.getContext(null, vr, getDs(rows),
             Context.FULL_DUMP, null, ea));
     List<Map<String, Object>> rs = new ArrayList<Map<String, Object>>();
     Map<String, Object> r = null;
@@ -86,7 +87,7 @@ public class TestSqlEntityProcessor {
     ea.put("query", "SELECT * FROM A");
     ea.put("transformer", T3.class.getName());
 
-    sep.init(AbstractDataImportHandlerTest.getContext(null, vr, getDs(rows),
+    sep.init(AbstractDataImportHandlerTestCase.getContext(null, vr, getDs(rows),
             Context.FULL_DUMP, null, ea));
     List<Map<String, Object>> rs = new ArrayList<Map<String, Object>>();
     Map<String, Object> r = null;
@@ -110,7 +111,7 @@ public class TestSqlEntityProcessor {
     HashMap<String, String> ea = new HashMap<String, String>();
     ea.put("query", "SELECT * FROM A");
     ea.put("transformer", T2.class.getName());
-    sep.init(AbstractDataImportHandlerTest.getContext(null, vr, getDs(rows),
+    sep.init(AbstractDataImportHandlerTestCase.getContext(null, vr, getDs(rows),
             Context.FULL_DUMP, null, ea));
 
     local.set(0);

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor2.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor2.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor2.java Thu Jul 22 19:34:35 2010
@@ -32,7 +32,7 @@ import java.text.ParseException;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestSqlEntityProcessor2 extends AbstractDataImportHandlerTest {
+public class TestSqlEntityProcessor2 extends AbstractDataImportHandlerTestCase {
   @Override
   public String getSchemaFile() {
     return "dataimport-schema.xml";

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessorDelta.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessorDelta.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessorDelta.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessorDelta.java Thu Jul 22 19:34:35 2010
@@ -32,7 +32,7 @@ import java.util.List;
  * @version $Id: TestSqlEntityProcessor2.java 723824 2008-12-05 19:14:11Z shalin $
  * @since solr 1.3
  */
-public class TestSqlEntityProcessorDelta extends AbstractDataImportHandlerTest {
+public class TestSqlEntityProcessorDelta extends AbstractDataImportHandlerTestCase {
   private static final String FULLIMPORT_QUERY = "select * from x";
 
   private static final String DELTA_QUERY = "select id from x where last_modified > NOW";

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessorDelta2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessorDelta2.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessorDelta2.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessorDelta2.java Thu Jul 22 19:34:35 2010
@@ -32,7 +32,7 @@ import java.util.List;
  * @version $Id: TestSqlEntityProcessor2.java 723824 2008-12-05 19:14:11Z shalin $
  * @since solr 1.3
  */
-public class TestSqlEntityProcessorDelta2 extends AbstractDataImportHandlerTest {
+public class TestSqlEntityProcessorDelta2 extends AbstractDataImportHandlerTestCase {
   private static final String FULLIMPORT_QUERY = "select * from x";
 
   private static final String DELTA_QUERY = "select id from x where last_modified > NOW";

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestTemplateString.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestTemplateString.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestTemplateString.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestTemplateString.java Thu Jul 22 19:34:35 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.handler.dataimport;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -32,7 +33,7 @@ import java.util.regex.Pattern;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestTemplateString {
+public class TestTemplateString extends SolrTestCaseJ4 {
   @Test
   public void testSimple() {
     VariableResolverImpl vri = new VariableResolverImpl();

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestTemplateTransformer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestTemplateTransformer.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestTemplateTransformer.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestTemplateTransformer.java Thu Jul 22 19:34:35 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.handler.dataimport;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -32,28 +33,28 @@ import java.util.Arrays;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestTemplateTransformer {
+public class TestTemplateTransformer extends SolrTestCaseJ4 {
 
   @Test
   @SuppressWarnings("unchecked")
   public void testTransformRow() {
     List fields = new ArrayList();
-    fields.add(AbstractDataImportHandlerTest.createMap("column", "firstName"));
-    fields.add(AbstractDataImportHandlerTest.createMap("column", "lastName"));
-    fields.add(AbstractDataImportHandlerTest.createMap("column", "middleName"));
-    fields.add(AbstractDataImportHandlerTest.createMap("column", "name",
+    fields.add(AbstractDataImportHandlerTestCase.createMap("column", "firstName"));
+    fields.add(AbstractDataImportHandlerTestCase.createMap("column", "lastName"));
+    fields.add(AbstractDataImportHandlerTestCase.createMap("column", "middleName"));
+    fields.add(AbstractDataImportHandlerTestCase.createMap("column", "name",
             TemplateTransformer.TEMPLATE,
             "${e.lastName}, ${e.firstName} ${e.middleName}"));
-    fields.add(AbstractDataImportHandlerTest.createMap("column", "emails",
+    fields.add(AbstractDataImportHandlerTestCase.createMap("column", "emails",
             TemplateTransformer.TEMPLATE,
             "${e.mail}"));
 
     // test reuse of template output in another template 
-    fields.add(AbstractDataImportHandlerTest.createMap("column", "mrname",
+    fields.add(AbstractDataImportHandlerTestCase.createMap("column", "mrname",
             TemplateTransformer.TEMPLATE,"Mr ${e.name}"));
 
     List<String> mails = Arrays.asList(new String[]{"a@b.com", "c@d.com"});
-    Map row = AbstractDataImportHandlerTest.createMap(
+    Map row = AbstractDataImportHandlerTestCase.createMap(
             "firstName", "Shalin",
             "middleName", "Shekhar", 
             "lastName", "Mangar",
@@ -61,10 +62,10 @@ public class TestTemplateTransformer {
 
     VariableResolverImpl resolver = new VariableResolverImpl();
     resolver.addNamespace("e", row);
-    Map<String, String> entityAttrs = AbstractDataImportHandlerTest.createMap(
+    Map<String, String> entityAttrs = AbstractDataImportHandlerTestCase.createMap(
             "name", "e");
 
-    Context context = AbstractDataImportHandlerTest.getContext(null, resolver,
+    Context context = AbstractDataImportHandlerTestCase.getContext(null, resolver,
             null, Context.FULL_DUMP, fields, entityAttrs);
     new TemplateTransformer().transformRow(row, context);
     Assert.assertEquals("Mangar, Shalin Shekhar", row.get("name"));

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestThreaded.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestThreaded.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestThreaded.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestThreaded.java Thu Jul 22 19:34:35 2010
@@ -23,7 +23,7 @@ import java.util.ArrayList;
 import java.util.Map;
 
 
-public class TestThreaded extends AbstractDataImportHandlerTest {
+public class TestThreaded extends AbstractDataImportHandlerTestCase {
   @Test
   @SuppressWarnings("unchecked")
   public void testCompositePk_FullImport() throws Exception {

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestURLDataSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestURLDataSource.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestURLDataSource.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestURLDataSource.java Thu Jul 22 19:34:35 2010
@@ -24,13 +24,14 @@ import java.util.Properties;
 
 import junit.framework.Assert;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Test;
 
-public class TestURLDataSource {
+public class TestURLDataSource extends SolrTestCaseJ4 {
   private List<Map<String, String>> fields = new ArrayList<Map<String, String>>();
   private URLDataSource dataSource = new URLDataSource();
   private VariableResolverImpl variableResolver = new VariableResolverImpl();
-  private Context context = AbstractDataImportHandlerTest.getContext(null, variableResolver,
+  private Context context = AbstractDataImportHandlerTestCase.getContext(null, variableResolver,
       dataSource, Context.FULL_DUMP, fields, null);
   private Properties initProps = new Properties();
   

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestVariableResolver.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestVariableResolver.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestVariableResolver.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestVariableResolver.java Thu Jul 22 19:34:35 2010
@@ -18,6 +18,7 @@ package org.apache.solr.handler.dataimpo
 
 import org.junit.Assert;
 import org.junit.Test;
+import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.util.DateMathParser;
 
 import java.text.SimpleDateFormat;
@@ -31,7 +32,7 @@ import java.util.*;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestVariableResolver {
+public class TestVariableResolver extends SolrTestCaseJ4 {
 
   @Test
   public void testSimpleNamespace() {

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java Thu Jul 22 19:34:35 2010
@@ -16,7 +16,9 @@
  */
 package org.apache.solr.handler.dataimport;
 
-import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTest.createMap;
+import static org.apache.solr.handler.dataimport.AbstractDataImportHandlerTestCase.createMap;
+
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -37,7 +39,7 @@ import java.util.concurrent.TimeUnit;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestXPathEntityProcessor {
+public class TestXPathEntityProcessor extends SolrTestCaseJ4 {
   boolean simulateSlowReader;
   boolean simulateSlowResultProcessor;
   int rowsToRead = -1;
@@ -56,7 +58,7 @@ public class TestXPathEntityProcessor {
     fields.add(createMap("column", "title", "xpath", "/catalog/cd/title"));
     fields.add(createMap("column", "artist", "xpath", "/catalog/cd/artist"));
     fields.add(createMap("column", "year", "xpath", "/catalog/cd/year"));
-    Context c = AbstractDataImportHandlerTest.getContext(null,
+    Context c = AbstractDataImportHandlerTestCase.getContext(null,
             new VariableResolverImpl(), getDataSource(cdData), Context.FULL_DUMP, fields, entityAttrs);
     XPathEntityProcessor xPathEntityProcessor = new XPathEntityProcessor();
     xPathEntityProcessor.init(c);
@@ -79,7 +81,7 @@ public class TestXPathEntityProcessor {
             XPathEntityProcessor.FOR_EACH, "/root");
     List fields = new ArrayList();
     fields.add(createMap("column", "a", "xpath", "/root/a", DataImporter.MULTI_VALUED, "true"));
-    Context c = AbstractDataImportHandlerTest.getContext(null,
+    Context c = AbstractDataImportHandlerTestCase.getContext(null,
             new VariableResolverImpl(), getDataSource(testXml), Context.FULL_DUMP, fields, entityAttrs);
     XPathEntityProcessor xPathEntityProcessor = new XPathEntityProcessor();
     xPathEntityProcessor.init(c);
@@ -99,7 +101,7 @@ public class TestXPathEntityProcessor {
             XPathEntityProcessor.FOR_EACH, "/root");
     List fields = new ArrayList();
     fields.add(createMap("column", "a", "xpath", "/root/a" ,"flatten","true"));
-    Context c = AbstractDataImportHandlerTest.getContext(null,
+    Context c = AbstractDataImportHandlerTestCase.getContext(null,
             new VariableResolverImpl(), getDataSource(testXmlFlatten), Context.FULL_DUMP, fields, entityAttrs);
     XPathEntityProcessor xPathEntityProcessor = new XPathEntityProcessor();
     xPathEntityProcessor.init(c);
@@ -124,7 +126,7 @@ public class TestXPathEntityProcessor {
     fields.add(createMap("column", "title", "xpath", "/catalog/cd/title"));
     fields.add(createMap("column", "artist", "xpath", "/catalog/cd/artist"));
     fields.add(createMap("column", "year", "xpath", "/catalog/cd/year"));
-    Context c = AbstractDataImportHandlerTest.getContext(null,
+    Context c = AbstractDataImportHandlerTestCase.getContext(null,
         new VariableResolverImpl(), getDataSource(cdData), Context.FULL_DUMP, fields, entityAttrs);
     XPathEntityProcessor xPathEntityProcessor = new XPathEntityProcessor() {
       private int count;
@@ -219,7 +221,7 @@ public class TestXPathEntityProcessor {
     Map entityAttrs = createMap("name", "e",
             XPathEntityProcessor.USE_SOLR_ADD_SCHEMA, "true", "xsl", ""
             + new File(tmpdir, "x.xsl").getAbsolutePath(), "url", "cd.xml");
-    Context c = AbstractDataImportHandlerTest.getContext(null,
+    Context c = AbstractDataImportHandlerTestCase.getContext(null,
             new VariableResolverImpl(), getDataSource(cdData), Context.FULL_DUMP, null, entityAttrs);
     XPathEntityProcessor xPathEntityProcessor = new XPathEntityProcessor();
     xPathEntityProcessor.init(c);

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathRecordReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathRecordReader.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathRecordReader.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathRecordReader.java Thu Jul 22 19:34:35 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.handler.dataimport;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -30,7 +31,7 @@ import java.util.Map;
  * @version $Id$
  * @since solr 1.3
  */
-public class TestXPathRecordReader {
+public class TestXPathRecordReader extends SolrTestCaseJ4 {
   @Test
   public void basic() {
     String xml="<root>\n"

Modified: lucene/dev/branches/realtime_search/solr/contrib/extraction/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/extraction/build.xml?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/extraction/build.xml (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/extraction/build.xml Thu Jul 22 19:34:35 2010
@@ -41,6 +41,8 @@
     <path refid="common.classpath" />
     <pathelement path="${dest}/classes" />
     <pathelement path="${dest}/test-classes" />
+    <pathelement location="${solr-path}/build/tests"/> <!-- include solr test code -->
+    <pathelement location="${solr-path}/../lucene/build/classes/test" />  <!-- include some lucene test code -->
     <pathelement path="${java.class.path}"/>
   </path>
 

Modified: lucene/dev/branches/realtime_search/solr/contrib/extraction/solr-cell-pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/extraction/solr-cell-pom.xml.template?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/extraction/solr-cell-pom.xml.template (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/extraction/solr-cell-pom.xml.template Thu Jul 22 19:34:35 2010
@@ -26,13 +26,13 @@
   <parent>
     <groupId>org.apache.solr</groupId>
     <artifactId>solr-parent</artifactId>
-    <version>@maven_version@</version>
+    <version>@version@</version>
   </parent>
 
   <groupId>org.apache.solr</groupId>
   <artifactId>solr-cell</artifactId>
   <name>Apache Solr Content Extraction Library</name>
-  <version>@maven_version@</version>
+  <version>@version@</version>
   <description>Apache Solr Content Extraction Library integrates Apache Tika content extraction framework into Solr</description>
   <packaging>jar</packaging>
 

Modified: lucene/dev/branches/realtime_search/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java Thu Jul 22 19:34:35 2010
@@ -16,7 +16,7 @@ package org.apache.solr.handler;
  * limitations under the License.
  */
 
-import org.apache.solr.util.AbstractSolrTestCase;
+import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.request.LocalSolrQueryRequest;
 import org.apache.solr.response.SolrQueryResponse;
 import org.apache.solr.common.util.ContentStream;
@@ -26,6 +26,11 @@ import org.apache.solr.common.SolrExcept
 import org.apache.solr.handler.extraction.ExtractingParams;
 import org.apache.solr.handler.extraction.ExtractingRequestHandler;
 import org.apache.solr.handler.extraction.ExtractingDocumentLoader;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
 
 import java.util.List;
 import java.util.ArrayList;
@@ -36,18 +41,20 @@ import java.io.File;
  *
  *
  **/
-public class ExtractingRequestHandlerTest extends AbstractSolrTestCase {
-  @Override
-  public String getSchemaFile() {
-    return "schema.xml";
+public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
+  @BeforeClass
+  public static void beforeClass() throws Exception {
+    initCore("solrconfig.xml", "schema.xml");
   }
 
-  @Override
-  public String getSolrConfigFile() {
-    return "solrconfig.xml";
+  @Before
+  public void setUp() throws Exception {
+    super.setUp();
+    clearIndex();
+    assertU(commit());
   }
 
-
+  @Test
   public void testExtraction() throws Exception {
     ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
     assertTrue("handler is null and it shouldn't be", handler != null);
@@ -134,6 +141,7 @@ public class ExtractingRequestHandlerTes
 
   }
 
+  @Test
   public void testDefaultField() throws Exception {
     ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
     assertTrue("handler is null and it shouldn't be", handler != null);
@@ -177,7 +185,7 @@ public class ExtractingRequestHandlerTes
     assertQ(req("+id:simple2 +t_href:[* TO *]"), "//*[@numFound='1']");
   }
 
-
+  @Test
   public void testLiterals() throws Exception {
     ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
     assertTrue("handler is null and it shouldn't be", handler != null);
@@ -231,7 +239,7 @@ public class ExtractingRequestHandlerTes
 
   }
 
-
+  @Test
   public void testPlainTextSpecifyingMimeType() throws Exception {
     ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
     assertTrue("handler is null and it shouldn't be", handler != null);
@@ -250,6 +258,7 @@ public class ExtractingRequestHandlerTes
     assertQ(req("extractedContent:Apache"), "//*[@numFound='1']");
   }
 
+  @Test
   public void testPlainTextSpecifyingResourceName() throws Exception {
     ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
     assertTrue("handler is null and it shouldn't be", handler != null);
@@ -271,7 +280,7 @@ public class ExtractingRequestHandlerTes
   // Note: If you load a plain text file specifying neither MIME type nor filename, extraction will silently fail. This is because Tika's
   // automatic MIME type detection will fail, and it will default to using an empty-string-returning default parser
 
-
+  @Test
   public void testExtractOnly() throws Exception {
     ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
     assertTrue("handler is null and it shouldn't be", handler != null);
@@ -308,6 +317,7 @@ public class ExtractingRequestHandlerTes
 
   }
 
+  @Test
   public void testXPath() throws Exception {
     ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
     assertTrue("handler is null and it shouldn't be", handler != null);
@@ -323,6 +333,7 @@ public class ExtractingRequestHandlerTes
   }
 
   /** test arabic PDF extraction is functional */
+  @Test
   public void testArabicPDF() throws Exception {
     ExtractingRequestHandler handler = (ExtractingRequestHandler) 
       h.getCore().getRequestHandler("/update/extract");

Modified: lucene/dev/branches/realtime_search/solr/example/solr/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/example/solr/conf/schema.xml?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/example/solr/conf/schema.xml (original)
+++ lucene/dev/branches/realtime_search/solr/example/solr/conf/schema.xml Thu Jul 22 19:34:35 2010
@@ -416,15 +416,11 @@
    -->
     <fieldtype name="geohash" class="solr.GeoHashField"/>
 
+
     <!--
-      A SpatialTileField is like a set of zoom levels on an interactive map (i.e. Google Maps or MapQuest).  It takes a lat/lon
-      field and indexes it into (end - start) different fields, each representing a different zoom level.
-      This can then be leveraged to quickly narrow the search space by creating a filter, at an appropriate tier level,
-      that only has to enumerate a minimum number of terms.
 
-      See http://wiki.apache.org/solr/SpatialSearch
      -->
-    <fieldType name="tile" class="solr.SpatialTileField" start="4" end="15" subFieldSuffix="_tiled"/>
+    <fieldType name="latLon" class="solr.LatLonType" subFieldSuffix="_latLon"/>
     
  </types>
 
@@ -467,9 +463,14 @@
    <field name="popularity" type="int" indexed="true" stored="true" />
    <field name="inStock" type="boolean" indexed="true" stored="true" />
 
+   <!--
+   The following store examples are used to demonstrate the various ways one might _CHOOSE_ to
+    implement spatial.  It is highly unlikely that you would ever have ALL of these fields defined.
+    -->
    <field name="store" type="location" indexed="true" stored="true"/>
+   <field name="store_lat_lon" type="latLon" indexed="true" stored="true"/>
    <field name="store_hash" type="geohash" indexed="true" stored="false"/>
-   <field name="store_tiles" type="tile" indexed="true" stored="false"/>
+
 
    <!-- Common metadata fields, named specifically to match up with
      SolrCell metadata when parsing rich documents such as Word, PDF.
@@ -490,7 +491,7 @@
 
    <!-- catchall field, containing all other searchable text fields (implemented
         via copyField further on in this schema  -->
-   <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
+   <field name="text" type="text" indexed="true" stored="true" multiValued="true" termVectors="true"/>
 
    <!-- catchall text field that indexes tokens both normally and in reverse for efficient
         leading wildcard queries. -->
@@ -525,7 +526,7 @@
    <dynamicField name="*_f"  type="float"  indexed="true"  stored="true"/>
    <dynamicField name="*_d"  type="double" indexed="true"  stored="true"/>
 
-   <dynamicField name="*_tiled"  type="double" indexed="true"  stored="false"/>
+   <dynamicField name="*_latLon"  type="double" indexed="true"  stored="false"/>
 
    <dynamicField name="*_dt" type="date"    indexed="true"  stored="true"/>
    <dynamicField name="*_p"  type="location" indexed="true" stored="true"/>
@@ -569,7 +570,7 @@
 
    <copyField source="cat" dest="text"/>
    <copyField source="store" dest="store_hash"/>
-   <copyField source="store" dest="store_tiles"/>
+  <copyField source="store" dest="store_lat_lon"/>
    <copyField source="name" dest="text"/>
    <copyField source="manu" dest="text"/>
    <copyField source="features" dest="text"/>

Modified: lucene/dev/branches/realtime_search/solr/example/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/example/solr/conf/solrconfig.xml?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/example/solr/conf/solrconfig.xml (original)
+++ lucene/dev/branches/realtime_search/solr/example/solr/conf/solrconfig.xml Thu Jul 22 19:34:35 2010
@@ -23,14 +23,6 @@
      the configuration.  See https://issues.apache.org/jira/browse/SOLR-1167
 -->
 <config>
-  <!-- Set this to 'false' if you want solr to continue working after it has 
-       encountered an severe configuration error.  In a production environment, 
-       you may want solr to keep working even if one handler is mis-configured.
-
-       You may also set this to false using by setting the system property:
-         -Dsolr.abortOnConfigurationError=false
-     -->
-  <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
   
   <!--
     Controls what version of Lucene various components of Solr adhere to. Generally, you want
@@ -55,7 +47,6 @@
        classpath, this is useful for including all jars in a directory.
     -->
   <lib dir="../../contrib/extraction/lib" />
-  <lib dir="../../contrib/velocity/src/main/solr/lib" />
   <!-- When a regex is specified in addition to a directory, only the files in that
        directory which completely match the regex (anchored on both ends)
        will be included.
@@ -509,6 +500,51 @@
         -->
      </lst>
   </requestHandler>
+  
+  <!-- 
+  -->
+  <requestHandler name="/browse" class="solr.SearchHandler">
+     <lst name="defaults">
+
+       <!-- VelocityResponseWriter settings -->
+       <str name="wt">velocity</str>
+       <str name="v.template">browse</str>
+       <str name="v.layout">layout</str>
+       <str name="title">Solritas</str>
+
+       <!-- Query settings -->
+       <str name="defType">dismax</str>
+       <str name="qf">
+          text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
+       </str>
+       <str name="q.alt">*:*</str>
+       <str name="rows">10</str>
+       <str name="fl">*,score</str>
+
+       <!-- Faceting defaults -->
+       <str name="facet">on</str>
+       <str name="facet.field">cat</str>
+       <str name="facet.field">manu_exact</str>
+       <str name="facet.mincount">1</str>
+
+       <!-- Highlighting defaults -->
+       <str name="hl">on</str>
+       <str name="hl.fl">text features name</str>
+       <str name="f.name.hl.fragsize">0</str>
+       <str name="f.name.hl.alternateField">name</str>
+
+       <!-- Spell checking defaults -->
+       <str name="spellcheck">on</str>
+       <str name="spellcheck.collate">true</str>
+       <str name="spellcheck.onlyMorePopular">false</str>
+       <str name="spellcheck.extendedResults">false</str>
+       <str name="spellcheck.count">3</str>
+     </lst>
+     <arr name="last-components">
+       <str>spellcheck</str>
+     </arr>
+  </requestHandler>
+  
 
 <!-- Please refer to http://wiki.apache.org/solr/SolrReplication for details on configuring replication -->
 <!-- remove the <lst name="master"> section if this is just a slave -->
@@ -975,6 +1011,9 @@
    <!-- Configure the standard fragListBuilder -->
    <fragListBuilder name="simple" class="org.apache.solr.highlight.SimpleFragListBuilder" default="true"/>
 
+   <!-- Configure the single fragListBuilder -->
+   <fragListBuilder name="single" class="org.apache.solr.highlight.SingleFragListBuilder"/>
+
    <!-- multi-colored tag FragmentsBuilder -->
    <fragmentsBuilder name="colored" class="org.apache.solr.highlight.MultiColoredScoreOrderFragmentsBuilder" default="true"/>
   </highlighting>
@@ -1022,14 +1061,13 @@
     <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
     <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
     <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
+    <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"/>
 
       Custom response writers can be declared as needed...
     
     <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
   -->
 
-  <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"/>
-
   <!-- XSLT response writer transforms the XML output by any xslt file found
        in Solr's conf/xslt directory.  Changes to xslt files are checked for
        every xsltCacheLifetimeSeconds.  

Modified: lucene/dev/branches/realtime_search/solr/example/solr/conf/velocity/VM_global_library.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/example/solr/conf/velocity/VM_global_library.vm?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/example/solr/conf/velocity/VM_global_library.vm (original)
+++ lucene/dev/branches/realtime_search/solr/example/solr/conf/velocity/VM_global_library.vm Thu Jul 22 19:34:35 2010
@@ -1,11 +1,46 @@
-#macro(nl2ul $named_list)
-  <ul>
-  #foreach($kv in $named_list)
-    <li>$kv.key ($kv.value)
-      #nl2ul($kv.value)
-    </li>
+#macro(param $key)$request.params.get($key)#end
+
+#macro(url_for_solr)/solr#if($request.core.name != "")/$request.core.name#end#end
+#macro(url_for_home)#url_for_solr/browse#end
+
+#macro(q)q=$!{esc.url($params.get('q'))}#end
+
+#macro(fqs $p)#foreach($fq in $p)#if($velocityCount>1)&#{end}fq=$esc.url($fq)#end#end
+
+#macro(debug)#if($request.params.get('debugQuery'))&debugQuery=true#end#end
+
+#macro(lens)?#q#if($request.params.getParams('fq') and $list.size($request.params.getParams('fq')) > 0)&#fqs($request.params.getParams('fq'))#end#debug#end
+
+#macro(url_for_lens)#{url_for_home}#lens#end
+
+#macro(url_for_start $start)#url_for_home#lens&start=$start#end
+
+#macro(url_for_filters $p)#url_for_home?#q#if($list.size($p) > 0)&#fqs($p)#end#debug#end
+
+## TODO: convert to use {!raw f=$field}$value (with escaping of course)
+#macro(url_for_facet_filter $field $value)#url_for_home#lens&fq=$esc.url($field):%22$esc.url($value)%22#end
+
+#macro(link_to_previous_page $text)
+  #if($page.current_page_number > 1)
+    #set($prev_start = $page.start - $page.results_per_page)
+    <a class="prev-page" href="#url_for_start($prev_start)">$text</a>
   #end
-  </ul>
 #end
 
-#macro(param $key)$request.params.get($key)#end
+#macro(link_to_next_page $text)
+  #if($page.current_page_number < $page.page_count)
+    #set($next_start = $page.start + $page.results_per_page)
+    <a class="next-page" href="#url_for_start($next_start)">$text</a>
+  #end
+#end
+
+#macro(link_to_page $page_number $text)
+  #if($page_number == $page.current_page_number)
+    $text
+  #else
+    #if($page_number <= $page.page_count)
+      #set($page_start = $page_number * $page.results_per_page - $page.results_per_page)
+      <a class="page" href="#url_for_start($page_start)">$text</a>
+    #end
+  #end
+#end

Propchange: lucene/dev/branches/realtime_search/solr/lib/commons-httpclient-3.1.jar
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 22 19:34:35 2010
@@ -1,2 +1,3 @@
-/lucene/dev/branches/branch_3x/solr/lib/commons-httpclient-3.1.jar:949730
+/lucene/dev/branches/branch_3x/solr/lib/commons-httpclient-3.1.jar:949730,961612
+/lucene/dev/trunk/solr/lib/commons-httpclient-3.1.jar:953476-966816
 /lucene/solr/trunk/lib/commons-httpclient-3.1.jar:922950-923910,923912-925091

Propchange: lucene/dev/branches/realtime_search/solr/lib/jcl-over-slf4j-1.5.5.jar
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 22 19:34:35 2010
@@ -1,2 +1,3 @@
-/lucene/dev/branches/branch_3x/solr/lib/jcl-over-slf4j-1.5.5.jar:949730
+/lucene/dev/branches/branch_3x/solr/lib/jcl-over-slf4j-1.5.5.jar:949730,961612
+/lucene/dev/trunk/solr/lib/jcl-over-slf4j-1.5.5.jar:953476-966816
 /lucene/solr/trunk/lib/jcl-over-slf4j-1.5.5.jar:922950-923910,923912-925091

Modified: lucene/dev/branches/realtime_search/solr/lib/solr-commons-csv-pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/lib/solr-commons-csv-pom.xml.template?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/lib/solr-commons-csv-pom.xml.template (original)
+++ lucene/dev/branches/realtime_search/solr/lib/solr-commons-csv-pom.xml.template Thu Jul 22 19:34:35 2010
@@ -24,13 +24,13 @@
   <parent>
     <groupId>org.apache.solr</groupId>
     <artifactId>solr-parent</artifactId>
-    <version>@maven_version@</version>
+    <version>@version@</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.solr</groupId>
   <artifactId>solr-commons-csv</artifactId>
   <name>Solr Specific Commons CSV</name>
-  <version>@maven_version@</version>
+  <version>@version@</version>
   <description>Solr Specific Commons CSV</description>
   <packaging>jar</packaging>
 </project>

Modified: lucene/dev/branches/realtime_search/solr/site/doap.rdf
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/doap.rdf?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/site/doap.rdf (original)
+++ lucene/dev/branches/realtime_search/solr/site/doap.rdf Thu Jul 22 19:34:35 2010
@@ -40,6 +40,14 @@
     <release>
       <Version>
         <branch>branch-1.4</branch>
+        <name>solr-1.4.1</name>
+        <created>2010-6-25</created>
+        <revision>1.4.1</revision>
+      </Version>
+    </release>    
+    <release>
+      <Version>
+        <branch>branch-1.4</branch>
         <name>solr-1.4.0</name>
         <created>2009-11-10</created>
         <revision>1.4.0</revision>

Modified: lucene/dev/branches/realtime_search/solr/site/features.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/features.html?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/site/features.html (original)
+++ lucene/dev/branches/realtime_search/solr/site/features.html Thu Jul 22 19:34:35 2010
@@ -66,7 +66,7 @@
 <a class="selected" href="index.html">Main</a>
 </li>
 <li>
-<a class="unselected" href="http://wiki.apache.org/solr">Wiki</a>
+<a class="unselected" href="http://wiki.apache.org/solr/FrontPage">Wiki</a>
 </li>
 </ul>
 <!--+
@@ -119,7 +119,7 @@ document.write("Last Published: " + docu
 <a href="tutorial.html">Tutorial</a>
 </div>
 <div class="menuitem">
-<a href="http://wiki.apache.org/solr/">Docs (Wiki)</a>
+<a href="http://wiki.apache.org/solr/FrontPage">Docs (Wiki)</a>
 </div>
 <div class="menuitem">
 <a href="http://wiki.apache.org/solr/FAQ">FAQ</a>



Mime
View raw message