jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1496759 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationTest.java
Date Wed, 26 Jun 2013 06:10:00 GMT
Author: mreutegg
Date: Wed Jun 26 06:10:00 2013
New Revision: 1496759

URL: http://svn.apache.org/r1496759
Log:
OAK-880: ChangeProcessor causes IllegalArgumentException when path filter ends with a slash
- Adding test (currently ignored)

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationTest.java?rev=1496759&r1=1496758&r2=1496759&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationTest.java
Wed Jun 26 06:10:00 2013
@@ -58,6 +58,7 @@ import org.apache.jackrabbit.oak.commons
 import org.apache.jackrabbit.oak.jcr.AbstractRepositoryTest;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class ObservationTest extends AbstractRepositoryTest {
@@ -197,6 +198,34 @@ public class ObservationTest extends Abs
     }
 
     @Test
+    @Ignore("OAK-880")
+    public void pathFilterWithTrailingSlash() throws Exception {
+        final String path = "/events/only/here";
+        ExpectationListener listener = new ExpectationListener();
+        listener.expect(new Expectation(path){
+            @Override
+            public boolean onEvent(Event event) throws Exception {
+                return PathUtils.isAncestor(path, event.getPath());
+            }
+        });
+
+        observationManager.addEventListener(listener, NODE_ADDED, path + "/", true, null,
null, false);
+        try {
+            Node root = getNode("/");
+            root.addNode("events").addNode("only").addNode("here").addNode("at");
+            root.getSession().save();
+
+            List<Expectation> missing = listener.getMissing(2, TimeUnit.SECONDS);
+            assertTrue("Missing events: " + missing, missing.isEmpty());
+            List<Event> unexpected = listener.getUnexpected();
+            assertTrue("Unexpected events: " + unexpected, unexpected.isEmpty());
+        }
+        finally {
+            observationManager.removeEventListener(listener);
+        }
+    }
+
+    @Test
     public void observationDispose()
             throws RepositoryException, InterruptedException, ExecutionException, TimeoutException
{
 



Mime
View raw message