cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1500786 - in /cxf/branches/2.7.x-fixes: ./ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
Date Mon, 08 Jul 2013 15:05:53 GMT
Author: sergeyb
Date: Mon Jul  8 15:05:53 2013
New Revision: 1500786

URL: http://svn.apache.org/r1500786
Log:
Merged revisions 1500735 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1500735 | sergeyb | 2013-07-08 14:56:37 +0100 (Mon, 08 Jul 2013) | 1 line
  
  [CXF-5026] Updating JAXRSAsyncClientTest to minimize a noise
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1500735

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java?rev=1500786&r1=1500785&r2=1500786&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
(original)
+++ cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
Mon Jul  8 15:05:53 2013
@@ -136,13 +136,14 @@ public class JAXRSAsyncClientTest extend
     public void testGetBookAsync404Callback() throws Exception {
         String address = "http://localhost:" + PORT + "/bookstore/bookheaders/404";
         WebClient wc = createWebClient(address);
-        final Holder<Book> holder = new Holder<Book>();
-        InvocationCallback<Book> callback = createCallback(holder);
+        final Holder<Object> holder = new Holder<Object>();
+        InvocationCallback<Object> callback = createCallback(holder);
         try {
             wc.async().get(callback).get();
             fail("Exception expected");
         } catch (ExecutionException ex) {
             assertTrue(ex.getCause() instanceof NotFoundException);
+            assertTrue(ex.getCause() == holder.value);
         }
     }
     
@@ -154,13 +155,13 @@ public class JAXRSAsyncClientTest extend
         return wc;
     }
     
-    private InvocationCallback<Book> createCallback(final Holder<Book> holder)
{
-        return new InvocationCallback<Book>() {
-            public void completed(Book response) {
+    private InvocationCallback<Object> createCallback(final Holder<Object> holder)
{
+        return new InvocationCallback<Object>() {
+            public void completed(Object response) {
                 holder.value = response;
             }
             public void failed(ClientException error) {
-                error.printStackTrace();
+                holder.value = error;
             }
         };
     }



Mime
View raw message