incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1541044 - in /sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest: repository/JackrabbitRepositoryNameTest.java repository/OakRepositoryNameTest.java util/RepositoryTestUtil.java
Date Tue, 12 Nov 2013 13:05:51 GMT
Author: bdelacretaz
Date: Tue Nov 12 13:05:50 2013
New Revision: 1541044

URL: http://svn.apache.org/r1541044
Log:
SLING-2788 - log repository name + version in tests

Modified:
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/repository/JackrabbitRepositoryNameTest.java
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/repository/OakRepositoryNameTest.java
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/util/RepositoryTestUtil.java

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/repository/JackrabbitRepositoryNameTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/repository/JackrabbitRepositoryNameTest.java?rev=1541044&r1=1541043&r2=1541044&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/repository/JackrabbitRepositoryNameTest.java
(original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/repository/JackrabbitRepositoryNameTest.java
Tue Nov 12 13:05:50 2013
@@ -48,6 +48,7 @@ public class JackrabbitRepositoryNameTes
     
     @Test
     public void checkJackrabbitName() throws Exception {
+        RepositoryTestUtil.logDescriptors(H,  "jcr.repository.name", "jcr.repository.version");
         assertEquals("Jackrabbit", RepositoryTestUtil.getDescriptor(H, "jcr.repository.name"));
     }
 }
\ No newline at end of file

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/repository/OakRepositoryNameTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/repository/OakRepositoryNameTest.java?rev=1541044&r1=1541043&r2=1541044&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/repository/OakRepositoryNameTest.java
(original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/repository/OakRepositoryNameTest.java
Tue Nov 12 13:05:50 2013
@@ -47,7 +47,8 @@ public class OakRepositoryNameTest {
     }
     
     @Test
-    public void checkJackrabbitName() throws Exception {
+    public void checkOakName() throws Exception {
+        RepositoryTestUtil.logDescriptors(H,  "jcr.repository.name", "jcr.repository.version");
         assertEquals("Apache Jackrabbit Oak", RepositoryTestUtil.getDescriptor(H, "jcr.repository.name"));
     }
 }
\ No newline at end of file

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/util/RepositoryTestUtil.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/util/RepositoryTestUtil.java?rev=1541044&r1=1541043&r2=1541044&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/util/RepositoryTestUtil.java
(original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/util/RepositoryTestUtil.java
Tue Nov 12 13:05:50 2013
@@ -24,9 +24,13 @@ import org.apache.sling.commons.json.JSO
 import org.apache.sling.commons.json.JSONObject;
 import org.apache.sling.commons.testing.integration.HttpTest;
 import org.apache.sling.commons.testing.integration.HttpTestBase;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class RepositoryTestUtil {
     
+    private static final Logger log = LoggerFactory.getLogger(RepositoryTestUtil.class);
+    
     public static final String DESCRIPTORS_KEY = "descriptors";
     
     public static String getDescriptor(HttpTestBase H, String descriptorName) throws JSONException,
IOException {
@@ -34,4 +38,10 @@ public class RepositoryTestUtil {
         final JSONObject json = new JSONObject(H.getContent(HttpTest.HTTP_BASE_URL + path,
HttpTest.CONTENT_TYPE_JSON));
         return json.getJSONObject("descriptors").getString(descriptorName);
     }
+    
+    public static void logDescriptors(HttpTestBase H, String ... names) throws JSONException,
IOException {
+        for(String name : names) {
+            log.info("Repository descriptor {}={}", name, getDescriptor(H, name));
+        }
+    }
 }
\ No newline at end of file



Mime
View raw message