cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1002267 - in /cxf/branches/2.2.x-fixes/systests/jaxrs/src/test: java/org/apache/cxf/systest/jaxrs/ resources/jaxrs_many_destinations/WEB-INF/
Date Tue, 28 Sep 2010 17:11:53 GMT
Author: sergeyb
Date: Tue Sep 28 17:11:53 2010
New Revision: 1002267

URL: http://svn.apache.org/viewvc?rev=1002267&view=rev
Log:
Fixing JAXRS test on 2.2.x

Added:
    cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ManyDestinationsResource.java
  (with props)
Modified:
    cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSOverlappingDestinationsTest.java
    cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_many_destinations/WEB-INF/beans.xml

Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSOverlappingDestinationsTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSOverlappingDestinationsTest.java?rev=1002267&r1=1002266&r2=1002267&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSOverlappingDestinationsTest.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSOverlappingDestinationsTest.java
Tue Sep 28 17:11:53 2010
@@ -24,13 +24,6 @@ import java.util.concurrent.ExecutorServ
 import java.util.concurrent.Executors;
 import java.util.concurrent.FutureTask;
 
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.UriInfo;
-
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 
@@ -133,48 +126,5 @@ public class JAXRSOverlappingDestination
         }
     }
     
-    @Path("/bookstore")
-    public static class Resource {
-
-        private volatile boolean locked;
-        
-        @GET
-        @Produces("text/plain")
-        @Path("request")
-        public String getRequestPath(@Context UriInfo ui, @QueryParam("delay") String delay)

-            throws Exception {
-            if (delay != null) {
-                Thread.sleep(5000);
-            }
-            return ui.getRequestUri().toString();
-        }
-        
-        
-        @GET
-        @Path("/uris")
-        @Produces("text/plain")
-        public String getUris(@Context UriInfo uriInfo) {
-            String baseUriOnEntry = uriInfo.getRequestUri().toString();
-            try {
-                while (locked) { Thread.sleep(1000); }
-            } catch (InterruptedException x) {
-                // ignore
-            }
-            String baseUriOnExit = uriInfo.getRequestUri().toString();
-            if (!baseUriOnEntry.equals(baseUriOnExit)) {
-                throw new RuntimeException();
-            }
-            return baseUriOnExit;
-        }
-
-        @GET
-        @Path("/lock")
-        @Produces("text/plain")
-        public String lock() { locked = true; return "locked"; }
-
-        @GET
-        @Path("/unlock")
-        @Produces("text/plain")
-        public String unlock() { locked = false; return "unlocked"; }
-    }
+    
 }

Added: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ManyDestinationsResource.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ManyDestinationsResource.java?rev=1002267&view=auto
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ManyDestinationsResource.java
(added)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ManyDestinationsResource.java
Tue Sep 28 17:11:53 2010
@@ -0,0 +1,72 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.UriInfo;
+
+@Path("/bookstore")
+public class ManyDestinationsResource {
+
+    private volatile boolean locked;
+    
+    @GET
+    @Produces("text/plain")
+    @Path("request")
+    public String getRequestPath(@Context UriInfo ui, @QueryParam("delay") String delay)

+        throws Exception {
+        if (delay != null) {
+            Thread.sleep(5000);
+        }
+        return ui.getRequestUri().toString();
+    }
+    
+    
+    @GET
+    @Path("/uris")
+    @Produces("text/plain")
+    public String getUris(@Context UriInfo uriInfo) {
+        String baseUriOnEntry = uriInfo.getRequestUri().toString();
+        try {
+            while (locked) { Thread.sleep(1000); }
+        } catch (InterruptedException x) {
+            // ignore
+        }
+        String baseUriOnExit = uriInfo.getRequestUri().toString();
+        if (!baseUriOnEntry.equals(baseUriOnExit)) {
+            throw new RuntimeException();
+        }
+        return baseUriOnExit;
+    }
+
+    @GET
+    @Path("/lock")
+    @Produces("text/plain")
+    public String lock() { locked = true; return "locked"; }
+
+    @GET
+    @Path("/unlock")
+    @Produces("text/plain")
+    public String unlock() { locked = false; return "unlocked"; }
+}
\ No newline at end of file

Propchange: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ManyDestinationsResource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ManyDestinationsResource.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_many_destinations/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_many_destinations/WEB-INF/beans.xml?rev=1002267&r1=1002266&r2=1002267&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_many_destinations/WEB-INF/beans.xml
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_many_destinations/WEB-INF/beans.xml
Tue Sep 28 17:11:53 2010
@@ -43,7 +43,7 @@ http://cxf.apache.org/schemas/core.xsd">
   <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
 
-  <bean class="org.apache.cxf.systest.jaxrs.JAXRSOverlappingDestinationsTest.Resource"

+  <bean class="org.apache.cxf.systest.jaxrs.ManyDestinationsResource" 
         id="serviceBean"/>
   
   <jaxrs:server address="/">



Mime
View raw message