Return-Path: X-Original-To: apmail-sling-commits-archive@www.apache.org Delivered-To: apmail-sling-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7DAEE6E1 for ; Wed, 6 Mar 2013 15:02:34 +0000 (UTC) Received: (qmail 98723 invoked by uid 500); 6 Mar 2013 15:02:34 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 98513 invoked by uid 500); 6 Mar 2013 15:02:29 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 97564 invoked by uid 99); 6 Mar 2013 15:02:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2013 15:02:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2013 15:02:25 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CD8C5238896F; Wed, 6 Mar 2013 15:02:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1453363 - in /sling/trunk/launchpad/integration-tests/src/main: java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolver/errorhandler/ resources/integration-test/servlets/errorhandler/testErrorHandler/ Date: Wed, 06 Mar 2013 15:02:04 -0000 To: commits@sling.apache.org From: asanso@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130306150204.CD8C5238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: asanso Date: Wed Mar 6 15:02:04 2013 New Revision: 1453363 URL: http://svn.apache.org/r1453363 Log: SLING-2718 - Add integration test for the error handling mechanism. - remove unused checks Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolver/errorhandler/ErrorHandlingTest.java sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/servlets/errorhandler/testErrorHandler/testErrorHandler.jsp Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolver/errorhandler/ErrorHandlingTest.java URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolver/errorhandler/ErrorHandlingTest.java?rev=1453363&r1=1453362&r2=1453363&view=diff ============================================================================== --- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolver/errorhandler/ErrorHandlingTest.java (original) +++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolver/errorhandler/ErrorHandlingTest.java Wed Mar 6 15:02:04 2013 @@ -81,30 +81,26 @@ public class ErrorHandlingTest extends J final String expected = "Internal Server Error (500) - custom error page"; final String url = testNodePath +SELECTOR_500+".html"; assertContains(getContent(url, CONTENT_TYPE_HTML,null,500), expected); - //assertNotContains(getContent(url, CONTENT_TYPE_HTML,null,200), "All good"); - } + } public void test_401_errorhandling() throws IOException{ final String expected = "401 Unauthorized - custom error page"; final String url = testNodePath +SELECTOR_401+".html"; assertContains(getContent(url, CONTENT_TYPE_HTML,null,401), expected); - //assertNotContains(getContent(url, CONTENT_TYPE_HTML,null,401), "All good"); } public void test_throwable_errorhandling() throws IOException{ final String expected = "Exception thrown - custom error page"; final String url = testNodePath +SELECTOR_THROWABLE+".html"; assertContains(getContent(url, CONTENT_TYPE_HTML,null,200), expected); - assertNotContains(getContent(url, CONTENT_TYPE_HTML,null,200), "All good"); - } + } public void test_500_errorhandling_POST_operation() throws IOException{ final String expected = "Internal Server Error (500) - custom error page"; final String url = testNodePath +".html"; uploadTestScript(THROW_ERROR_PATH+"/"+"POST.jsp", THROW_ERROR_PATH+"/"+"POST.jsp"); assertContains(getContent(url, CONTENT_TYPE_HTML,null,500,HTTP_METHOD_POST), expected); - //assertNotContains(getContent(url, CONTENT_TYPE_HTML,null,200), "All good"); - } + } public void test_errorhandling_POST_operation_SlingPostServlet() throws IOException{ final String expected = "Exception thrown - custom error page"; Modified: sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/servlets/errorhandler/testErrorHandler/testErrorHandler.jsp URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/servlets/errorhandler/testErrorHandler/testErrorHandler.jsp?rev=1453363&r1=1453362&r2=1453363&view=diff ============================================================================== --- sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/servlets/errorhandler/testErrorHandler/testErrorHandler.jsp (original) +++ sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/servlets/errorhandler/testErrorHandler/testErrorHandler.jsp Wed Mar 6 15:02:04 2013 @@ -38,4 +38,3 @@ if(Arrays.asList(slingRequest.getRequest throw new Exception("throwable selector was specified"); } %> -All good