manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1582111 - in /manifoldcf/branches/CONNECTORS-912: connectors/solr/connector/src/test/java/org/ connectors/solr/connector/src/test/java/org/apache/ connectors/solr/connector/src/test/java/org/apache/manifoldcf/ connectors/solr/connector/src...
Date Wed, 26 Mar 2014 23:16:42 GMT
Author: kwright
Date: Wed Mar 26 23:16:42 2014
New Revision: 1582111

URL: http://svn.apache.org/r1582111
Log:
Move solr tests to solr connector

Added:
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/BaseITDerby.java
      - copied, changed from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/BaseDerby.java
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/BaseUIDerby.java
      - copied, changed from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/BaseUIDerby.java
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/FileHelper.java
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/MockSolrService.java
      - copied, changed from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/MockSolrService.java
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/NavigationDerbyUI.java
      - copied, changed from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/SolrCrawlDerbyIT.java
      - copied, changed from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrCrawlDerbyIT.java
    manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/SolrTester.java
      - copied, changed from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrTester.java
Removed:
    manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/BaseDerby.java
    manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/BaseUIDerby.java
    manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/FileHelper.java
    manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/MockSolrService.java
    manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrCrawlDerbyIT.java
    manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrTester.java

Copied: manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/BaseITDerby.java
(from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/BaseDerby.java)
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/BaseITDerby.java?p2=manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/BaseITDerby.java&p1=manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/BaseDerby.java&r1=1579604&r2=1582111&rev=1582111&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/BaseDerby.java
(original)
+++ manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/BaseITDerby.java
Wed Mar 26 23:16:42 2014
@@ -16,7 +16,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-package org.apache.manifoldcf.solr_tests;
+package org.apache.manifoldcf.agents.output.solr.tests;
 
 import org.apache.manifoldcf.core.interfaces.*;
 import org.apache.manifoldcf.agents.interfaces.*;
@@ -28,16 +28,16 @@ import java.util.*;
 import org.junit.*;
 
 /** Tests that run the "agents daemon" should be derived from this */
-public class BaseDerby extends org.apache.manifoldcf.crawler.tests.BaseITDerby
+public class BaseITDerby extends org.apache.manifoldcf.crawler.tests.BaseITDerby
 {
   protected String[] getConnectorNames()
   {
-    return new String[]{"File Connector"};
+    return new String[]{"Test Connector"};
   }
   
   protected String[] getConnectorClasses()
   {
-    return new String[]{"org.apache.manifoldcf.crawler.connectors.filesystem.FileConnector"};
+    return new String[]{"org.apache.manifoldcf.crawler.tests.TestingRepositoryConnector"};
   }
   
   protected String[] getOutputNames()

Copied: manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/BaseUIDerby.java
(from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/BaseUIDerby.java)
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/BaseUIDerby.java?p2=manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/BaseUIDerby.java&p1=manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/BaseUIDerby.java&r1=1579604&r2=1582111&rev=1582111&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/BaseUIDerby.java
(original)
+++ manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/BaseUIDerby.java
Wed Mar 26 23:16:42 2014
@@ -16,7 +16,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-package org.apache.manifoldcf.solr_tests;
+package org.apache.manifoldcf.agents.output.solr.tests;
 
 import org.apache.manifoldcf.core.interfaces.*;
 import org.apache.manifoldcf.agents.interfaces.*;
@@ -32,12 +32,12 @@ public class BaseUIDerby extends org.apa
 {
   protected String[] getConnectorNames()
   {
-    return new String[]{"File Connector"};
+    return new String[]{"Test Connector"};
   }
   
   protected String[] getConnectorClasses()
   {
-    return new String[]{"org.apache.manifoldcf.crawler.connectors.filesystem.FileConnector"};
+    return new String[]{"org.apache.manifoldcf.crawler.tests.TestingRepositoryConnector"};
   }
   
   protected String[] getOutputNames()

Added: manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/FileHelper.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/FileHelper.java?rev=1582111&view=auto
==============================================================================
    (empty)

Copied: manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/MockSolrService.java
(from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/MockSolrService.java)
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/MockSolrService.java?p2=manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/MockSolrService.java&p1=manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/MockSolrService.java&r1=1579604&r2=1582111&rev=1582111&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/MockSolrService.java
(original)
+++ manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/MockSolrService.java
Wed Mar 26 23:16:42 2014
@@ -16,7 +16,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-package org.apache.manifoldcf.solr_tests;
+package org.apache.manifoldcf.agents.output.solr.tests;
 
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.eclipse.jetty.server.Server;

Copied: manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/NavigationDerbyUI.java
(from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/NavigationDerbyUI.java)
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/NavigationDerbyUI.java?p2=manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/NavigationDerbyUI.java&p1=manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/NavigationDerbyUI.java&r1=1579604&r2=1582111&rev=1582111&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/NavigationDerbyUI.java
(original)
+++ manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/NavigationDerbyUI.java
Wed Mar 26 23:16:42 2014
@@ -16,7 +16,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-package org.apache.manifoldcf.solr_tests;
+package org.apache.manifoldcf.agents.output.solr.tests;
 
 import org.apache.manifoldcf.core.interfaces.*;
 import org.apache.manifoldcf.agents.interfaces.*;
@@ -138,7 +138,7 @@ public class NavigationDerbyUI extends B
     window = testerInstance.findWindow(null);
     form = window.findForm(testerInstance.createStringDescription("editconnection"));
     selectbox = form.findSelectbox(testerInstance.createStringDescription("classname"));
-    selectbox.selectValue(testerInstance.createStringDescription("org.apache.manifoldcf.crawler.connectors.filesystem.FileConnector"));
+    selectbox.selectValue(testerInstance.createStringDescription("org.apache.manifoldcf.crawler.tests.TestingRepositoryConnector"));
     button = window.findButton(testerInstance.createStringDescription("Continue to next page"));
     button.click();
     // Visit the Throttling tab

Copied: manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/SolrCrawlDerbyIT.java
(from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrCrawlDerbyIT.java)
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/SolrCrawlDerbyIT.java?p2=manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/SolrCrawlDerbyIT.java&p1=manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrCrawlDerbyIT.java&r1=1579604&r2=1582111&rev=1582111&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrCrawlDerbyIT.java
(original)
+++ manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/SolrCrawlDerbyIT.java
Wed Mar 26 23:16:42 2014
@@ -16,14 +16,14 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-package org.apache.manifoldcf.solr_tests;
+package org.apache.manifoldcf.agents.output.solr.tests;
 
 import java.io.*;
 import java.util.*;
 import org.junit.*;
 
 /** This is a very basic sanity check */
-public class SolrCrawlDerbyIT extends BaseDerby
+public class SolrCrawlDerbyIT extends BaseITDerby
 {
 
   protected SolrTester tester;
@@ -54,20 +54,6 @@ public class SolrCrawlDerbyIT extends Ba
       solrService.stop();
   }
 
-  @Before
-  public void setupTestArea()
-    throws Exception
-  {
-    tester.setupTestArea();
-  }
-  
-  @After
-  public void teardownTestArea()
-    throws Exception
-  {
-    tester.teardownTestArea();
-  }
-  
   @Test
   public void simpleCrawl()
     throws Exception

Copied: manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/SolrTester.java
(from r1579604, manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrTester.java)
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/SolrTester.java?p2=manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/SolrTester.java&p1=manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrTester.java&r1=1579604&r2=1582111&rev=1582111&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-912/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrTester.java
(original)
+++ manifoldcf/branches/CONNECTORS-912/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/SolrTester.java
Wed Mar 26 23:16:42 2014
@@ -16,7 +16,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-package org.apache.manifoldcf.solr_tests;
+package org.apache.manifoldcf.agents.output.solr.tests;
 
 import org.apache.manifoldcf.core.interfaces.*;
 import org.apache.manifoldcf.agents.interfaces.*;
@@ -38,39 +38,6 @@ public class SolrTester
     this.instance = instance;
   }
   
-  public void setupTestArea()
-    throws Exception
-  {
-    File f = new File("testdata");
-    FileHelper.removeDirectory(f);
-    FileHelper.createDirectory(f);
-    // Create the test data files.
-    String baseFileName = "testdata/";
-    int i0 = 0;
-    while (i0 < 10)
-    {
-      String fileName0 = baseFileName + "/dir-" + i0;
-      FileHelper.createDirectory(new File(fileName0));
-      int i1 = 0;
-      while (i1 < 10)
-      {
-        String fileName1 = fileName0 + "/file-"+i1;
-        FileHelper.createFile(new File(fileName1),"Test file "+i0+":"+i1);
-        i1++;
-      }
-      i0++;
-    }
-    System.err.println("Done generating files");
-  }
-  
-  public void teardownTestArea()
-    throws Exception
-  {
-    System.err.println("Removing generated files");
-    File f = new File("testdata");
-    FileHelper.removeDirectory(f);
-  }
-  
   public void executeTest()
     throws Exception
   {
@@ -81,9 +48,9 @@ public class SolrTester
     // Create a basic file system connection, and save it.
     IRepositoryConnectionManager mgr = RepositoryConnectionManagerFactory.make(tc);
     IRepositoryConnection conn = mgr.create();
-    conn.setName("File Connection");
-    conn.setDescription("File Connection");
-    conn.setClassName("org.apache.manifoldcf.crawler.connectors.filesystem.FileConnector");
+    conn.setName("Test Connection");
+    conn.setDescription("Test Connection");
+    conn.setClassName("org.apache.manifoldcf.crawler.tests.TestRepositoryConnector");
     conn.setMaxConnections(100);
     // Now, save
     mgr.save(conn);
@@ -120,22 +87,8 @@ public class SolrTester
       
     // Now, set up the document specification.
     DocumentSpecification ds = job.getSpecification();
-    // Crawl everything underneath the 'testdata' area
-    File testDataFile = new File("testdata").getCanonicalFile();
-    if (!testDataFile.exists())
-      throw new ManifoldCFException("Test data area not found!  Looking in "+testDataFile.toString());
-    if (!testDataFile.isDirectory())
-      throw new ManifoldCFException("Test data area not a directory!  Looking in "+testDataFile.toString());
-    SpecificationNode sn = new SpecificationNode("startpoint");
-    sn.setAttribute("path",testDataFile.toString());
-    SpecificationNode n = new SpecificationNode("include");
-    n.setAttribute("type","file");
-    n.setAttribute("match","*");
-    sn.addChild(sn.getChildCount(),n);
-    n = new SpecificationNode("include");
-    n.setAttribute("type","directory");
-    n.setAttribute("match","*");
-    sn.addChild(sn.getChildCount(),n);
+    SpecificationNode sn = new SpecificationNode("documentcount");
+    sn.setAttribute("count","111");
     ds.addChild(ds.getChildCount(),sn);
       
     // Set up the output specification.



Mime
View raw message