You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2014/05/12 15:12:28 UTC

svn commit: r1593960 - in /sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl: BundleDeploymentTest.java ContentDeploymentTest.java JcrFullCoverageAggregatesDeploymentTest.java helpers/Poller.java helpers/ServerAdapter.java

Author: rombert
Date: Mon May 12 13:12:28 2014
New Revision: 1593960

URL: http://svn.apache.org/r1593960
Log:
SLING-3116 - Node structures serialized to a .content.xml file do not
propagate deletions

Improved generics usage when polling.

Modified:
    sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/BundleDeploymentTest.java
    sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/ContentDeploymentTest.java
    sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/JcrFullCoverageAggregatesDeploymentTest.java
    sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/Poller.java
    sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/ServerAdapter.java

Modified: sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/BundleDeploymentTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/BundleDeploymentTest.java?rev=1593960&r1=1593959&r2=1593960&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/BundleDeploymentTest.java (original)
+++ sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/BundleDeploymentTest.java Mon May 12 13:12:28 2014
@@ -128,7 +128,7 @@ public class BundleDeploymentTest {
                 repo.assertGetIsSuccessful("simple-servlet", "Version 1");
                 return null;
             }
-        }, CoreMatchers.nullValue());
+        }, CoreMatchers.<Void> nullValue());
 
         // update DS component class
         InputStream simpleServlet2 = null;
@@ -145,6 +145,6 @@ public class BundleDeploymentTest {
                 repo.assertGetIsSuccessful("simple-servlet", "Version 2");
                 return null;
             }
-        }, CoreMatchers.nullValue());
+        }, CoreMatchers.<Void> nullValue());
     }
 }

Modified: sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/ContentDeploymentTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/ContentDeploymentTest.java?rev=1593960&r1=1593959&r2=1593960&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/ContentDeploymentTest.java (original)
+++ sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/ContentDeploymentTest.java Mon May 12 13:12:28 2014
@@ -102,7 +102,7 @@ public class ContentDeploymentTest {
                 repo.assertGetIsSuccessful("test/hello.txt", "hello, world");
                 return null;
             }
-        }, CoreMatchers.nullValue());
+        }, CoreMatchers.<Void> nullValue());
 
         project.createOrUpdateFile(Path.fromPortableString("jcr_root/test/hello.txt"), new ByteArrayInputStream(
                 "goodbye, world".getBytes()));
@@ -114,7 +114,7 @@ public class ContentDeploymentTest {
                 repo.assertGetIsSuccessful("test/hello.txt", "goodbye, world");
                 return null;
             }
-        }, CoreMatchers.nullValue());
+        }, CoreMatchers.<Void> nullValue());
 
 
         project.deleteMember(Path.fromPortableString("jcr_root/test/hello.txt"));
@@ -126,7 +126,7 @@ public class ContentDeploymentTest {
                 repo.assertGetReturns404("test/hello.txt");
                 return null;
             }
-        }, CoreMatchers.nullValue());
+        }, CoreMatchers.<Void> nullValue());
 
     }
 
@@ -168,7 +168,7 @@ public class ContentDeploymentTest {
                 allOf(hasPath("/test"), hasPrimaryType("sling:Folder"), hasChildrenCount(1)));
     }
 
-    private void assertThatNode(final RepositoryAccessor repo, Poller poller, final String nodePath, Matcher matcher)
+    private void assertThatNode(final RepositoryAccessor repo, Poller poller, final String nodePath, Matcher<Node> matcher)
             throws InterruptedException {
 
         poller.pollUntil(new Callable<Node>() {

Modified: sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/JcrFullCoverageAggregatesDeploymentTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/JcrFullCoverageAggregatesDeploymentTest.java?rev=1593960&r1=1593959&r2=1593960&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/JcrFullCoverageAggregatesDeploymentTest.java (original)
+++ sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/JcrFullCoverageAggregatesDeploymentTest.java Mon May 12 13:12:28 2014
@@ -94,7 +94,7 @@ public class JcrFullCoverageAggregatesDe
         ServerAdapter server = new ServerAdapter(wstServer.getServer());
         server.installModule(contentProject);
 
-        Matcher postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:Folder"),
+        Matcher<Node> postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:Folder"),
                 hasMixinTypes("mix:language"), hasChildrenCount(3));
 
         final RepositoryAccessor repo = new RepositoryAccessor(config);
@@ -133,7 +133,7 @@ public class JcrFullCoverageAggregatesDe
         ServerAdapter server = new ServerAdapter(wstServer.getServer());
         server.installModule(contentProject);
 
-        Matcher postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:Folder"),
+        Matcher<Node> postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:Folder"),
                 hasMixinTypes("mix:language"), hasChildrenCount(3));
 
         final RepositoryAccessor repo = new RepositoryAccessor(config);

Modified: sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/Poller.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/Poller.java?rev=1593960&r1=1593959&r2=1593960&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/Poller.java (original)
+++ sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/Poller.java Mon May 12 13:12:28 2014
@@ -67,7 +67,7 @@ public class Poller {
         }
     }
 
-    public <V> V pollUntil(final Callable<V> callable, final Matcher<Object> matcher) throws InterruptedException {
+    public <V> V pollUntil(final Callable<V> callable, final Matcher<V> matcher) throws InterruptedException {
 
         final Object[] holder = new Object[1];
 

Modified: sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/ServerAdapter.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/ServerAdapter.java?rev=1593960&r1=1593959&r2=1593960&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/ServerAdapter.java (original)
+++ sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/ServerAdapter.java Mon May 12 13:12:28 2014
@@ -16,8 +16,6 @@
  */
 package org.apache.sling.ide.test.impl.helpers;
 
-import static org.hamcrest.CoreMatchers.notNullValue;
-
 import java.util.concurrent.Callable;
 
 import org.eclipse.core.resources.IProject;
@@ -27,6 +25,7 @@ import org.eclipse.wst.server.core.IModu
 import org.eclipse.wst.server.core.IServer;
 import org.eclipse.wst.server.core.IServerWorkingCopy;
 import org.eclipse.wst.server.core.ServerUtil;
+import org.hamcrest.CoreMatchers;
 
 /**
  * The <tt>ServerAdapter</tt> adapts the Eclipse server APIs to make them simpler to use for testing purposes
@@ -48,7 +47,7 @@ public class ServerAdapter {
             public IModule call() throws Exception {
                 return ServerUtil.getModule(project);
             }
-        }, notNullValue());
+        }, CoreMatchers.<IModule> notNullValue());
 
         IServerWorkingCopy serverWorkingCopy = server.createWorkingCopy();
         serverWorkingCopy.modifyModules(new IModule[] { bundleModule }, new IModule[0], new NullProgressMonitor());