cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Minor update to the 404 RxJava test
Date Thu, 13 Oct 2016 16:01:46 GMT
Repository: cxf
Updated Branches:
  refs/heads/master e45cc2543 -> e7895d6a7


Minor update to the 404 RxJava test


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e7895d6a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e7895d6a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e7895d6a

Branch: refs/heads/master
Commit: e7895d6a7cb071fdea57f6d2607dabe2d22db47f
Parents: e45cc25
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Oct 13 17:01:30 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Oct 13 17:01:30 2016 +0100

----------------------------------------------------------------------
 .../systest/jaxrs/reactive/JAXRSReactiveTest.java    | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/e7895d6a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/reactive/JAXRSReactiveTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/reactive/JAXRSReactiveTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/reactive/JAXRSReactiveTest.java
index 10ce5ea..d581bbe 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/reactive/JAXRSReactiveTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/reactive/JAXRSReactiveTest.java
@@ -21,6 +21,7 @@ package org.apache.cxf.systest.jaxrs.reactive;
 
 import java.util.Collections;
 import java.util.List;
+import java.util.concurrent.ExecutionException;
 
 import javax.ws.rs.NotFoundException;
 import javax.ws.rs.core.GenericType;
@@ -140,14 +141,16 @@ public class JAXRSReactiveTest extends AbstractBusClientServerTestBase
{
     public void testGetHelloWorldAsyncObservable404() throws Exception {
         String address = "http://localhost:" + PORT + "/reactive/textAsync404";
         WebClient wc = WebClient.create(address);
-        try {
-            wc.rx(ObservableRxInvoker.class).get(String.class).subscribe(s -> System.out.println());
-            fail("Exception expected");
-        } catch (Throwable ex) {
-            assertTrue(ex.getCause().getCause() instanceof NotFoundException);
-        }
+        wc.rx(ObservableRxInvoker.class).get(String.class).subscribe(
+            s -> {
+                fail("Exception expected");
+            },
+            t -> validateT((ExecutionException)t));
     }
     
+    private void validateT(ExecutionException t) {
+        assertTrue(t.getCause() instanceof NotFoundException);
+    }
     private void assertDuplicateResponse(String s) {
         assertEquals("Hello, world!Hello, world!", s);
     }


Mime
View raw message