Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3ED0F2009F8 for ; Fri, 3 Jun 2016 16:56:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3BEA2160A49; Fri, 3 Jun 2016 14:56:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 842C4160A3B for ; Fri, 3 Jun 2016 16:56:44 +0200 (CEST) Received: (qmail 61427 invoked by uid 500); 3 Jun 2016 14:56:43 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 61418 invoked by uid 99); 3 Jun 2016 14:56:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2016 14:56:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 892B9DFB14; Fri, 3 Jun 2016 14:56:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: <70e0a4f8a0a04d10aa1162dc13553f17@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: [CXF-6929] Adding more tests Date: Fri, 3 Jun 2016 14:56:43 +0000 (UTC) archived-at: Fri, 03 Jun 2016 14:56:45 -0000 Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 1f692efcb -> c0ad4d310 [CXF-6929] Adding more tests Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c0ad4d31 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c0ad4d31 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c0ad4d31 Branch: refs/heads/3.1.x-fixes Commit: c0ad4d310af835fa5bd751979898068fd3258fc9 Parents: 1f692ef Author: Sergey Beryozkin Authored: Fri Jun 3 15:55:25 2016 +0100 Committer: Sergey Beryozkin Committed: Fri Jun 3 15:56:19 2016 +0100 ---------------------------------------------------------------------- .../jaxrs/AbstractJAXRSContinuationsTest.java | 18 ++++++++++++++++++ .../cxf/systest/jaxrs/BookContinuationStore.java | 14 ++++++++++++++ 2 files changed, 32 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/c0ad4d31/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractJAXRSContinuationsTest.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractJAXRSContinuationsTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractJAXRSContinuationsTest.java index f2c152b..69ae0d7 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractJAXRSContinuationsTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractJAXRSContinuationsTest.java @@ -98,6 +98,24 @@ public abstract class AbstractJAXRSContinuationsTest extends AbstractBusClientSe } @Test + public void testGetBookNotFoundUnmappedImmediate() throws Exception { + WebClient wc = + WebClient.create("http://localhost:" + getPort() + getBaseAddress() + "/books/notfound/unmappedImmediate"); + wc.accept("text/plain"); + Response r = wc.get(); + assertEquals(500, r.getStatus()); + } + + @Test + public void testGetBookMappedImmediate() throws Exception { + WebClient wc = + WebClient.create("http://localhost:" + getPort() + getBaseAddress() + "/books/mappedImmediate"); + wc.accept("text/plain"); + Response r = wc.get(); + assertEquals(401, r.getStatus()); + } + + @Test public void testTimeoutAndCancel() throws Exception { doTestTimeoutAndCancel(getBaseAddress()); } http://git-wip-us.apache.org/repos/asf/cxf/blob/c0ad4d31/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java index 04c5c30..bdcdd1b 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java @@ -33,6 +33,7 @@ import javax.ws.rs.NotFoundException; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; +import javax.ws.rs.WebApplicationException; import javax.ws.rs.container.AsyncResponse; import javax.ws.rs.container.CompletionCallback; import javax.ws.rs.container.ConnectionCallback; @@ -137,6 +138,19 @@ public class BookContinuationStore { } @GET + @Path("books/notfound/unmappedImmediate") + @Produces("text/plain") + public void handleUnmappedImmediate(@Suspended AsyncResponse response) throws BookNotFoundFault { + throw new BookNotFoundFault(""); + } + @GET + @Path("books/mappedImmediate") + @Produces("text/plain") + public void handleMappedImmediate(@Suspended AsyncResponse response) throws BookNotFoundFault { + throw new WebApplicationException(Response.status(401).build()); + } + + @GET @Path("books/unmappedFromFilter") @Produces("text/plain") public void handleContinuationRequestUnmappedFromFilter(@Suspended AsyncResponse response) {