incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1327482 - in /incubator/lcf/branches/CONNECTORS-459: framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/ tests/cmis/src/test/java/org/apache/manifoldcf/...
Date Wed, 18 Apr 2012 12:38:57 GMT
Author: kwright
Date: Wed Apr 18 12:38:56 2012
New Revision: 1327482

URL: http://svn.apache.org/viewvc?rev=1327482&view=rev
Log:
More work on tests.

Modified:
    incubator/lcf/branches/CONNECTORS-459/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFJettyRunner.java
    incubator/lcf/branches/CONNECTORS-459/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/BaseDerby.java
    incubator/lcf/branches/CONNECTORS-459/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseDerby.java
    incubator/lcf/branches/CONNECTORS-459/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/BaseDerby.java
    incubator/lcf/branches/CONNECTORS-459/tests/rss/src/test/java/org/apache/manifoldcf/rss_tests/MockRSSService.java
    incubator/lcf/branches/CONNECTORS-459/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/MockWikiService.java

Modified: incubator/lcf/branches/CONNECTORS-459/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFJettyRunner.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-459/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFJettyRunner.java?rev=1327482&r1=1327481&r2=1327482&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-459/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFJettyRunner.java
(original)
+++ incubator/lcf/branches/CONNECTORS-459/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFJettyRunner.java
Wed Apr 18 12:38:56 2012
@@ -30,10 +30,8 @@ import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.server.handler.ContextHandlerCollection;
 import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.Connector;
 import org.eclipse.jetty.webapp.WebAppContext;
 
 /**

Modified: incubator/lcf/branches/CONNECTORS-459/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/BaseDerby.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-459/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/BaseDerby.java?rev=1327482&r1=1327481&r2=1327482&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-459/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/BaseDerby.java
(original)
+++ incubator/lcf/branches/CONNECTORS-459/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/BaseDerby.java
Wed Apr 18 12:38:56 2012
@@ -18,10 +18,8 @@
 */
 package org.apache.manifoldcf.alfresco_tests;
 
-import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.server.handler.ContextHandlerCollection;
 import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.Connector;
 import org.eclipse.jetty.webapp.WebAppContext;
 import org.eclipse.jetty.plus.naming.Resource;
 

Modified: incubator/lcf/branches/CONNECTORS-459/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseDerby.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-459/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseDerby.java?rev=1327482&r1=1327481&r2=1327482&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-459/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseDerby.java
(original)
+++ incubator/lcf/branches/CONNECTORS-459/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseDerby.java
Wed Apr 18 12:38:56 2012
@@ -21,10 +21,9 @@ package org.apache.manifoldcf.cmis_tests
 import org.apache.manifoldcf.crawler.system.ManifoldCF;
 import org.junit.After;
 import org.junit.Before;
-import org.eclipse.jetty.server.Handler;
+
 import org.eclipse.jetty.server.handler.ContextHandlerCollection;
 import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.Connector;
 import org.eclipse.jetty.webapp.WebAppContext;
 
 /** Tests that run the "agents daemon" should be derived from this 

Modified: incubator/lcf/branches/CONNECTORS-459/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/BaseDerby.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-459/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/BaseDerby.java?rev=1327482&r1=1327481&r2=1327482&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-459/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/BaseDerby.java
(original)
+++ incubator/lcf/branches/CONNECTORS-459/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/BaseDerby.java
Wed Apr 18 12:38:56 2012
@@ -22,8 +22,11 @@ import org.apache.manifoldcf.crawler.sys
 import org.elasticsearch.node.Node;
 import org.junit.After;
 import org.junit.Before;
-import org.mortbay.jetty.Server;
-import org.mortbay.jetty.webapp.WebAppContext;
+
+import org.eclipse.jetty.server.handler.ContextHandlerCollection;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.webapp.WebAppContext;
+
 import static org.elasticsearch.node.NodeBuilder.*;
 
 /**  
@@ -71,9 +74,11 @@ public class BaseDerby extends org.apach
       openCmisServerWarPath = System.getProperty("openCmisServerWarPath");
     
     //Initialize OpenCMIS Server bindings
+    ContextHandlerCollection contexts = new ContextHandlerCollection();
+    cmisServer.setHandler(contexts);
     WebAppContext openCmisServerApi = new WebAppContext(openCmisServerWarPath,"/chemistry-opencmis-server-inmemory");
     openCmisServerApi.setParentLoaderPriority(false);
-    cmisServer.addHandler(openCmisServerApi);
+    contexts.addHandler(openCmisServerApi);
     
     System.out.println("OpenCMIS InMemory server is starting...");
     cmisServer.start();

Modified: incubator/lcf/branches/CONNECTORS-459/tests/rss/src/test/java/org/apache/manifoldcf/rss_tests/MockRSSService.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-459/tests/rss/src/test/java/org/apache/manifoldcf/rss_tests/MockRSSService.java?rev=1327482&r1=1327481&r2=1327482&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-459/tests/rss/src/test/java/org/apache/manifoldcf/rss_tests/MockRSSService.java
(original)
+++ incubator/lcf/branches/CONNECTORS-459/tests/rss/src/test/java/org/apache/manifoldcf/rss_tests/MockRSSService.java
Wed Apr 18 12:38:56 2012
@@ -19,18 +19,14 @@
 package org.apache.manifoldcf.rss_tests;
 
 import org.eclipse.jetty.servlet.ServletHolder;
-import org.eclipse.jetty.server.handler.ContextHandlerCollection;
-import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.webapp.WebAppContext;
 import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.util.thread.QueuedThreadPool;
 
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.eclipse.jetty.util.thread.QueuedThreadPool;
 
 import java.io.*;
 import java.util.*;
@@ -46,8 +42,10 @@ public class MockRSSService
     server = new Server(8189);
     server.setThreadPool(new QueuedThreadPool(35));
     servlet = new RSSServlet(docsPerFeed);
-    ServletContextHandler asContext = new ServletContextHandler(server,"/rss",Context.SESSIONS);
-    asContext.addServlet(new ServletHolder(servlet), "/gen.php");
+    ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
+    context.setContextPath("/rss");
+    server.setHandler(context);
+    context.addServlet(new ServletHolder(servlet), "/gen.php");
   }
     
   public void start() throws Exception

Modified: incubator/lcf/branches/CONNECTORS-459/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/MockWikiService.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-459/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/MockWikiService.java?rev=1327482&r1=1327481&r2=1327482&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-459/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/MockWikiService.java
(original)
+++ incubator/lcf/branches/CONNECTORS-459/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/MockWikiService.java
Wed Apr 18 12:38:56 2012
@@ -18,9 +18,10 @@
 */
 package org.apache.manifoldcf.wiki_tests;
 
-import org.mortbay.jetty.Server;
-import org.mortbay.jetty.servlet.Context;
-import org.mortbay.jetty.servlet.ServletHolder;
+import org.eclipse.jetty.servlet.ServletHolder;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.util.thread.QueuedThreadPool;
 
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
@@ -38,9 +39,12 @@ public class MockWikiService
   public MockWikiService(Class theResourceClass)
   {
     server = new Server(8089);
+    server.setThreadPool(new QueuedThreadPool(35));
     servlet = new WikiAPIServlet(theResourceClass);
-    Context asContext = new Context(server,"/w",Context.SESSIONS);
-    asContext.addServlet(new ServletHolder(servlet), "/api.php");
+    ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
+    context.setContextPath("/w");
+    server.setHandler(context);
+    context.addServlet(new ServletHolder(servlet), "/api.php");
   }
     
   public void start() throws Exception



Mime
View raw message