cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r965924 - in /cxf/branches/servlet3jetty7/rt: javascript/src/test/resources/ transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/ transports/http-j...
Date Tue, 20 Jul 2010 17:33:54 GMT
Author: dkulp
Date: Tue Jul 20 17:33:54 2010
New Revision: 965924

URL: http://svn.apache.org/viewvc?rev=965924&view=rev
Log:
Unit test updates

Modified:
    cxf/branches/servlet3jetty7/rt/javascript/src/test/resources/XMLHttpRequestTestBeans.xml
    cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
    cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
    cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
    cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
    cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPTestHandler.java
    cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
    cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml

Modified: cxf/branches/servlet3jetty7/rt/javascript/src/test/resources/XMLHttpRequestTestBeans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/servlet3jetty7/rt/javascript/src/test/resources/XMLHttpRequestTestBeans.xml?rev=965924&r1=965923&r2=965924&view=diff
==============================================================================
--- cxf/branches/servlet3jetty7/rt/javascript/src/test/resources/XMLHttpRequestTestBeans.xml
(original)
+++ cxf/branches/servlet3jetty7/rt/javascript/src/test/resources/XMLHttpRequestTestBeans.xml
Tue Jul 20 17:33:54 2010
@@ -41,17 +41,17 @@
 	<httpj:engine-factory bus="cxf">
 		<httpj:engine port="8808">
 			<httpj:handlers>
-				<bean class="org.eclipse.jetty.handler.ContextHandler">
+				<bean class="org.eclipse.jetty.server.handler.ContextHandler">
 					<property name="contextPath" value="/" />
 					<property name="handler">
-						<bean class="org.eclipse.jetty.handler.ResourceHandler">
+						<bean class="org.eclipse.jetty.server.handler.ResourceHandler">
 							<property name="baseResource">
-								<bean class="org.eclipse.resource.FileResource">
+								<bean class="org.eclipse.jetty.util.resource.FileResource">
 									<constructor-arg value="${staticResourceURL}" />
 								</bean>
 							</property>
 							<property name="mimeTypes">
-								<bean class="org.eclipse.jetty.MimeTypes">
+								<bean class="org.eclipse.jetty.http.MimeTypes">
 									<property name="mimeMap">
 									    <map>
 									    	<entry key="html"><value>text/html; charset="utf-8"</value></entry>
@@ -62,7 +62,7 @@
 						</bean>
 					</property>
 				</bean>
-				<bean class="org.eclipse.jetty.handler.DefaultHandler" />
+				<bean class="org.eclipse.jetty.server.handler.DefaultHandler" />
 			</httpj:handlers>
 		</httpj:engine>
 	</httpj:engine-factory>

Modified: cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java?rev=965924&r1=965923&r2=965924&view=diff
==============================================================================
--- cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
(original)
+++ cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
Tue Jul 20 17:33:54 2010
@@ -304,7 +304,10 @@ public class JettyHTTPDestination extend
             resp.flushBuffer();
             baseRequest.setHandled(true);
         } catch (SuspendedInvocationException ex) {
-            //nothing - async case
+            if (ex.getRuntimeException() != null) {
+                throw ex.getRuntimeException();
+            }
+            //else nothing to do
         } catch (Fault ex) {
             Throwable cause = ex.getCause();
             if (cause instanceof RuntimeException) {

Modified: cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java?rev=965924&r1=965923&r2=965924&view=diff
==============================================================================
--- cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
(original)
+++ cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
Tue Jul 20 17:33:54 2010
@@ -290,7 +290,7 @@ public class JettyHTTPServerEngineFactor
             MBeanServer mbs =  bus.getExtension(InstrumentationManager.class).getMBeanServer();
             if (mbs != null) {
                 try {
-                    Class<?> cls = ClassLoaderUtils.loadClass("org.eclipse.management.MBeanContainer",

+                    Class<?> cls = ClassLoaderUtils.loadClass("org.eclipse.jetty.jmx.MBeanContainer",

                                                           getClass());
                     
                     mBeanContainer = (Container.Listener) cls.

Modified: cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java?rev=965924&r1=965923&r2=965924&view=diff
==============================================================================
--- cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
(original)
+++ cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
Tue Jul 20 17:33:54 2010
@@ -58,6 +58,7 @@ import org.apache.cxf.transport.ConduitI
 import org.apache.cxf.transport.ConduitInitiatorManager;
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.MessageObserver;
+import org.apache.cxf.transport.http.AbstractHTTPDestination;
 import org.apache.cxf.transports.http.QueryHandler;
 import org.apache.cxf.transports.http.QueryHandlerRegistry;
 import org.apache.cxf.transports.http.StemMatchingQueryHandler;
@@ -68,7 +69,6 @@ import org.apache.cxf.ws.addressing.JAXW
 import org.apache.cxf.ws.policy.PolicyEngine;
 import org.apache.cxf.wsdl.EndpointReferenceUtils;
 import org.easymock.classextension.EasyMock;
-import org.eclipse.jetty.continuation.Continuation;
 import org.eclipse.jetty.http.HttpFields;
 import org.eclipse.jetty.server.Request;
 import org.eclipse.jetty.server.Response;
@@ -205,11 +205,7 @@ public class JettyHTTPDestinationTest ex
     @Test
     public void testContinuationsIgnored() throws Exception {
         
-        Continuation continuation = EasyMock.createMock(Continuation.class);
         HttpServletRequest httpRequest = EasyMock.createMock(HttpServletRequest.class);
-        httpRequest.getAttribute("org.eclipse.jetty.ajax.Continuation");
-        EasyMock.expectLastCall().andReturn(continuation);
-        EasyMock.replay(httpRequest);
         
         ServiceInfo serviceInfo = new ServiceInfo();
         serviceInfo.setName(new QName("bla", "Service"));
@@ -697,6 +693,9 @@ public class JettyHTTPDestinationTest ex
             if ("GET".equals(method) && "?wsdl".equals(query)) {
                 verifyGetWSDLQuery();                
             } else { // test for the post
+                EasyMock.expect(request.getAttribute(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE))
+                    .andReturn(null);
+                
                 EasyMock.expect(request.getMethod()).andReturn(method);            
                 EasyMock.expect(request.getInputStream()).andReturn(is);
                 EasyMock.expect(request.getContextPath()).andReturn("/bar");

Modified: cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java?rev=965924&r1=965923&r2=965924&view=diff
==============================================================================
--- cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
(original)
+++ cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
Tue Jul 20 17:33:54 2010
@@ -185,7 +185,7 @@ public class JettyHTTPServerEngineTest e
         engine.addServant(new URL(urlStr2), handler2);
         
         Set<ObjectName>  s = CastUtils.cast(ManagementFactory.getPlatformMBeanServer().
-            queryNames(new ObjectName("org.eclipse.jetty:type=server,*"), null));
+            queryNames(new ObjectName("org.eclipse.jetty.server:type=server,*"), null));
         assertEquals("Could not find 1 Jetty Server: " + s, 1, s.size());
         
         engine.removeServant(new URL(urlStr));
@@ -215,13 +215,13 @@ public class JettyHTTPServerEngineTest e
         engine.addServant(new URL(urlStr), handler1);
         
         Set<ObjectName>  s = CastUtils.cast(ManagementFactory.getPlatformMBeanServer().
-            queryNames(new ObjectName("org.eclipse.jetty:type=server,*"), null));
+            queryNames(new ObjectName("org.eclipse.jetty.server:type=server,*"), null));
         assertEquals("Could not find 1 Jetty Server: " + s, 1, s.size());
         
         engine2.addServant(new URL(urlStr2), handler2);
         
         s = CastUtils.cast(ManagementFactory.getPlatformMBeanServer().
-            queryNames(new ObjectName("org.eclipse.jetty:type=server,*"), null));
+            queryNames(new ObjectName("org.eclipse.jetty.server:type=server,*"), null));
         assertEquals("Could not find 2 Jetty Server: " + s, 2, s.size());
         
         engine.removeServant(new URL(urlStr));
@@ -231,13 +231,13 @@ public class JettyHTTPServerEngineTest e
         engine.shutdown();
         
         s = CastUtils.cast(ManagementFactory.getPlatformMBeanServer().
-            queryNames(new ObjectName("org.eclipse.jetty:type=server,*"), null));
+            queryNames(new ObjectName("org.eclipse.jetty.server:type=server,*"), null));
         assertEquals("Could not find 2 Jetty Server: " + s, 1, s.size());
         
         engine2.shutdown();
         
         s = CastUtils.cast(ManagementFactory.getPlatformMBeanServer().
-            queryNames(new ObjectName("org.eclipse.jetty:type=server,*"), null));
+            queryNames(new ObjectName("org.eclipse.jetty.server:type=server,*"), null));
         assertEquals("Could not find 0 Jetty Server: " + s, 0, s.size());
         
         factory.destroyForPort(9234);
@@ -289,6 +289,7 @@ public class JettyHTTPServerEngineTest e
         //         transport.http_jetty:type=jettyhttptesthandler,id=0)
         // when running subsequent tests.
         contextHandler = engine.getContextHandler(new URL(urlStr));
+        contextHandler.stop();
         contextHandler.setHandler(handler2);
         contextHandler.start();
 

Modified: cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPTestHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPTestHandler.java?rev=965924&r1=965923&r2=965924&view=diff
==============================================================================
--- cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPTestHandler.java
(original)
+++ cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPTestHandler.java
Tue Jul 20 17:33:54 2010
@@ -21,9 +21,12 @@ package org.apache.cxf.transport.http_je
 
 import java.io.IOException;
 
+import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.eclipse.jetty.server.Request;
+
 public class JettyHTTPTestHandler extends JettyHTTPHandler {
     private boolean contextMatchExact;
     private String response;
@@ -34,8 +37,11 @@ public class JettyHTTPTestHandler extend
         response = s;
     }
 
-    public void handle(String target, HttpServletRequest req,
-                       HttpServletResponse resp, int dispatch) throws IOException {
+    @Override
+    public void handle(String target, 
+                       Request baseRequest,
+                       HttpServletRequest request,
+                       HttpServletResponse resp) throws IOException, ServletException {
 
         if (contextMatchExact) {
             // just return the response for testing

Modified: cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
URL: http://svn.apache.org/viewvc/cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml?rev=965924&r1=965923&r2=965924&view=diff
==============================================================================
--- cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
(original)
+++ cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
Tue Jul 20 17:33:54 2010
@@ -89,7 +89,7 @@
            </beans:bean>
          </hj:connector>
          <hj:handlers>
-           <beans:bean class="org.eclipse.jetty.handler.DefaultHandler"/>         
+           <beans:bean class="org.eclipse.jetty.server.handler.DefaultHandler"/>  
      
          </hj:handlers>
          <hj:sessionSupport>true</hj:sessionSupport>
 	  </hj:engine> 

Modified: cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml?rev=965924&r1=965923&r2=965924&view=diff
==============================================================================
--- cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
(original)
+++ cxf/branches/servlet3jetty7/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
Tue Jul 20 17:33:54 2010
@@ -73,7 +73,7 @@
            </beans:bean>
          </hj:connector>
          <hj:handlers>
-           <beans:bean class="org.eclipse.jetty.handler.DefaultHandler"/>         
+           <beans:bean class="org.eclipse.jetty.server.handler.DefaultHandler"/>  
      
          </hj:handlers>
          <hj:sessionSupport>true</hj:sessionSupport>
 	  </hj:engine> 



Mime
View raw message