You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ch...@apache.org on 2015/01/15 05:26:07 UTC

svn commit: r1651947 - /sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/auth/AuthenticationResponseCodeTest.java

Author: chetanm
Date: Thu Jan 15 04:26:07 2015
New Revision: 1651947

URL: http://svn.apache.org/r1651947
Log:
SLING-4280 - Enable dumping of remote server logs in case of test failures

Deliberately failing test to see the resultant output on ci server. This change would be reverted after required observation is done

Modified:
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/auth/AuthenticationResponseCodeTest.java

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/auth/AuthenticationResponseCodeTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/auth/AuthenticationResponseCodeTest.java?rev=1651947&r1=1651946&r2=1651947&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/auth/AuthenticationResponseCodeTest.java (original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/auth/AuthenticationResponseCodeTest.java Thu Jan 15 04:26:07 2015
@@ -36,11 +36,12 @@ import org.apache.commons.httpclient.aut
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.sling.commons.testing.integration.HttpTest;
-import org.apache.sling.commons.testing.junit.categories.JackrabbitOnly;
+import org.apache.sling.testing.tools.junit.RemoteLogDumper;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import org.junit.rules.TestRule;
 
 /**
  * Test of the response code from an authentication request depending on various
@@ -48,8 +49,11 @@ import org.junit.experimental.categories
  * non-browser client detection.
  */
 public class AuthenticationResponseCodeTest {
-    
-    private final HttpTest H = new HttpTest(); 
+
+    @Rule
+    public TestRule logRule = new RemoteLogDumper();
+
+    private final HttpTest H = new HttpTest();
 
     @Before
     public void setup() throws Exception {
@@ -76,6 +80,7 @@ public class AuthenticationResponseCodeT
         HttpMethod post2 = H.assertPostStatus(HttpTest.HTTP_BASE_URL + "/j_security_check", HttpServletResponse.SC_OK,
                 params2, null);
         assertTrue(post2.getResponseBodyAsString().length() == 0);
+        assertTrue(false);
     }
 
     @Test