sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1615938 - in /sling/trunk/contrib/extensions/replication/it: ./ src/test/java/org/apache/sling/replication/it/
Date Tue, 05 Aug 2014 14:59:00 GMT
Author: tommaso
Date: Tue Aug  5 14:59:00 2014
New Revision: 1615938

URL: http://svn.apache.org/r1615938
Log:
SLING-3820 - fixed ITs for forward and reverse replication

Modified:
    sling/trunk/contrib/extensions/replication/it/pom.xml
    sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ForwardReplicationTest.java
    sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationAgentResourcesIntegrationTest.java
    sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationIntegrationTestBase.java
    sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationUtils.java
    sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReverseReplicationTest.java

Modified: sling/trunk/contrib/extensions/replication/it/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/it/pom.xml?rev=1615938&r1=1615937&r2=1615938&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/it/pom.xml (original)
+++ sling/trunk/contrib/extensions/replication/it/pom.xml Tue Aug  5 14:59:00 2014
@@ -281,7 +281,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.tools</artifactId>
-            <version>1.0.7-SNAPSHOT</version>
+            <version>1.0.9-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

Modified: sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ForwardReplicationTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ForwardReplicationTest.java?rev=1615938&r1=1615937&r2=1615938&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ForwardReplicationTest.java
(original)
+++ sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ForwardReplicationTest.java
Tue Aug  5 14:59:00 2014
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package org.apache.sling.replication.it;
 
 import org.apache.sling.replication.communication.ReplicationActionType;

Modified: sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationAgentResourcesIntegrationTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationAgentResourcesIntegrationTest.java?rev=1615938&r1=1615937&r2=1615938&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationAgentResourcesIntegrationTest.java
(original)
+++ sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationAgentResourcesIntegrationTest.java
Tue Aug  5 14:59:00 2014
@@ -23,6 +23,7 @@ import java.util.UUID;
 import org.junit.Test;
 
 import static org.apache.sling.replication.it.ReplicationUtils.*;
+
 /**
  * Integration test for {@link org.apache.sling.replication.agent.ReplicationAgent} resources
  */

Modified: sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationIntegrationTestBase.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationIntegrationTestBase.java?rev=1615938&r1=1615937&r2=1615938&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationIntegrationTestBase.java
(original)
+++ sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationIntegrationTestBase.java
Tue Aug  5 14:59:00 2014
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package org.apache.sling.replication.it;
 
 import org.apache.sling.testing.tools.sling.SlingClient;
@@ -62,7 +61,7 @@ public abstract class ReplicationIntegra
             assertExists(authorClient, "/libs/sling/replication/agents/publish");
         }
         catch (Exception ex) {
-
+            throw new RuntimeException(ex);
         }
 
     }

Modified: sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationUtils.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationUtils.java?rev=1615938&r1=1615937&r2=1615938&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationUtils.java
(original)
+++ sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReplicationUtils.java
Tue Aug  5 14:59:00 2014
@@ -117,25 +117,25 @@ public class ReplicationUtils {
     }
 
     public static void assertExists(SlingClient slingClient, String path) throws Exception
{
-        int retries = 10;
+        int retries = 100;
         while (!slingClient.exists(path) && retries-- > 0) {
             Thread.sleep(1000);
         }
-        assertTrue(slingClient.exists(path));
+        assertTrue("path " + path + " doesn't exist", slingClient.exists(path));
     }
 
     public static void assertNotExits(SlingClient slingClient, String path) throws Exception
{
-        int retries = 10;
+        int retries = 100;
         while (slingClient.exists(path) && retries-- > 0) {
             Thread.sleep(1000);
         }
-        assertFalse(slingClient.exists(path));
+        assertFalse("path " + path + " still exists", slingClient.exists(path));
     }
 
     public static String createRandomNode(SlingClient slingClient, String parentPath) throws
Exception {
         String nodePath = parentPath + "/" + UUID.randomUUID();
         if (!slingClient.exists(parentPath)) {
-            slingClient.createNode(parentPath, "jcr:primaryType", "nt:unstructured");
+            slingClient.mkdirs(parentPath);
         }
         slingClient.createNode(nodePath, "jcr:primaryType", "nt:unstructured", "propName",
"propValue");
         return nodePath;

Modified: sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReverseReplicationTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReverseReplicationTest.java?rev=1615938&r1=1615937&r2=1615938&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReverseReplicationTest.java
(original)
+++ sling/trunk/contrib/extensions/replication/it/src/test/java/org/apache/sling/replication/it/ReverseReplicationTest.java
Tue Aug  5 14:59:00 2014
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.sling.replication.it;
 
 
@@ -6,6 +24,9 @@ import org.junit.Test;
 
 import static org.apache.sling.replication.it.ReplicationUtils.*;
 
+/**
+ * Integration test for reverse replication
+ */
 public class ReverseReplicationTest extends ReplicationIntegrationTestBase {
     @Test
     public void testAddContent() throws Exception {



Mime
View raw message