incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1167277 - in /sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest: JSONGroovyBuilderTest.java JsonRenderingTest.java JspTestBase.java PropertyRenderingTest.java
Date Fri, 09 Sep 2011 16:22:34 GMT
Author: justin
Date: Fri Sep  9 16:22:34 2011
New Revision: 1167277

URL: http://svn.apache.org/viewvc?rev=1167277&view=rev
Log:
SLING-2213 - applying patch from Jukka Zitting (thanks)

Modified:
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JSONGroovyBuilderTest.java
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspTestBase.java
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/PropertyRenderingTest.java

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JSONGroovyBuilderTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JSONGroovyBuilderTest.java?rev=1167277&r1=1167276&r2=1167277&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JSONGroovyBuilderTest.java
(original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JSONGroovyBuilderTest.java
Fri Sep  9 16:22:34 2011
@@ -25,8 +25,15 @@ import org.apache.sling.commons.json.JSO
 import org.apache.sling.commons.json.JSONObject;
 import org.apache.sling.launchpad.webapp.integrationtest.RenderingTestBase;
 import org.apache.sling.servlets.post.SlingPostConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class JSONGroovyBuilderTest extends RenderingTestBase {
+
+    /** Logger instance */
+    private static final Logger log =
+            LoggerFactory.getLogger(JSONGroovyBuilderTest.class);
+
     private String slingResourceType;
 
     @Override
@@ -66,7 +73,7 @@ public class JSONGroovyBuilderTest exten
         final String toDelete = uploadTestScript("builder_rich_object.groovy","json.groovy");
         try {
             final String content = getContent(displayUrl + ".json", CONTENT_TYPE_JSON);
-            System.out.println(content);
+            log.debug("{} content: {}", displayUrl, content);
             JSONObject jo = new JSONObject(content);
             assertEquals("Content contained wrong number of items", 2, jo.length());
             assertEquals("Content contained wrong data", testText, jo.get("text"));

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java?rev=1167277&r1=1167276&r2=1167277&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java
(original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java
Fri Sep  9 16:22:34 2011
@@ -24,10 +24,16 @@ import javax.servlet.http.HttpServletRes
 
 import org.apache.sling.commons.testing.integration.HttpTestBase;
 import org.apache.sling.servlets.post.SlingPostConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /** Test creating Nodes and rendering them in JSON */
 public class JsonRenderingTest extends HttpTestBase {
 
+    /** Logger instance */
+    private static final Logger log =
+            LoggerFactory.getLogger(JsonRenderingTest.class);
+
 	private final String testPath = "/" + getClass().getSimpleName();
     private String postUrl;
 
@@ -128,7 +134,8 @@ public class JsonRenderingTest extends H
       final String url = testClient.createNode(postUrl, props);
       final String json = getContent(url + ".infinity.json",
           CONTENT_TYPE_JSON, null, 300);
-      System.err.println("Url: " + url + "\npostUrl: " + postUrl);
+      log.info("Url: {}", url);
+      log.info("postUrl: {}", postUrl);
       // Get the resource url. (everything after the port)
       // We skip http://localhost:8888/org.apache.sling.launchpad.testing-6-SNAPSHOT/
       // or http://localhost:8888/

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspTestBase.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspTestBase.java?rev=1167277&r1=1167276&r2=1167277&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspTestBase.java
(original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspTestBase.java
Fri Sep  9 16:22:34 2011
@@ -16,11 +16,18 @@
  */
 package org.apache.sling.launchpad.webapp.integrationtest;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /** Base class for tests that use JSP - configures the JSP
  *  scripting engine in a test-friendly way
  */
 public abstract class JspTestBase extends RenderingTestBase {
 
+    /** Logger instance */
+    private static final Logger log =
+            LoggerFactory.getLogger(JspTestBase.class);
+
     public static final String SCRIPT = "serverscripts/jsp-engine-setup.jsp";
     private static boolean jspEngineConfigured;
     
@@ -32,7 +39,7 @@ public abstract class JspTestBase extend
             final String content = executeScript(SCRIPT);
             assertTrue("JSP engine setup script must return success message", content.contains("Configuration
updated"));
             jspEngineConfigured = true;
-            System.err.println("JSP script engine configured using " + SCRIPT);
+            log.info("JSP script engine configured using {}", SCRIPT);
         }
     }
 }

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/PropertyRenderingTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/PropertyRenderingTest.java?rev=1167277&r1=1167276&r2=1167277&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/PropertyRenderingTest.java
(original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/PropertyRenderingTest.java
Fri Sep  9 16:22:34 2011
@@ -20,12 +20,18 @@ import java.io.IOException;
 
 import org.apache.sling.commons.testing.integration.NameValuePairList;
 import org.apache.sling.servlets.post.SlingPostConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /** Test the rendering of JCR Properties, directly addressed by URLs.
  *  See SLING-133
  */
 public class PropertyRenderingTest extends RenderingTestBase {
 
+    /** Logger instance */
+    private static final Logger log =
+            LoggerFactory.getLogger(PropertyRenderingTest.class);
+
     private String slingResourceType;
 
     private String testMultiText1;
@@ -87,7 +93,7 @@ public class PropertyRenderingTest exten
 
     public void testMultiValuedTextHtml() throws IOException {
         final String data = getContent(displayUrl + "/multiText.html", CONTENT_TYPE_HTML);
-        System.out.println(data);
+        log.debug("multiText.html content: {}", data);
         assertTrue(data.contains(testMultiText1));
         assertTrue(data.contains(testMultiText2));
     }



Mime
View raw message