jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1738712 - /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/GetInfoTest.java
Date Tue, 12 Apr 2016 07:18:57 GMT
Author: mreutegg
Date: Tue Apr 12 07:18:57 2016
New Revision: 1738712

URL: http://svn.apache.org/viewvc?rev=1738712&view=rev
Log:
JCR-3961: Some tests in GetInfoTest do not save changes

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/GetInfoTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/GetInfoTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/GetInfoTest.java?rev=1738712&r1=1738711&r2=1738712&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/GetInfoTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/GetInfoTest.java
Tue Apr 12 07:18:57 2016
@@ -23,6 +23,7 @@ import java.util.Set;
 import javax.jcr.Node;
 import javax.jcr.Property;
 import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 import javax.jcr.observation.Event;
 
 /**
@@ -81,11 +82,12 @@ public class GetInfoTest extends Abstrac
         Event[] events = getEvents(new Callable(){
             public void call() throws RepositoryException {
                 prop.setValue("modified");
+                prop.getSession().save();
             }
         }, Event.PROPERTY_CHANGED);
         for (int i = 0; i < events.length; i++) {
             Set<?> unexpectedKeys = getUnexpectedKeys(events[i].getInfo());
-            assertEquals("info map must be empty", 0, unexpectedKeys.size());
+            assertEquals("info map must be empty: " + unexpectedKeys, 0, unexpectedKeys.size());
         }
     }
 
@@ -95,12 +97,14 @@ public class GetInfoTest extends Abstrac
         testRootNode.getSession().save();
         Event[] events = getEvents(new Callable(){
             public void call() throws RepositoryException {
+                Session s = prop.getSession();
                 prop.remove();
+                s.save();
             }
         }, Event.PROPERTY_REMOVED);
         for (int i = 0; i < events.length; i++) {
             Set<?> unexpectedKeys = getUnexpectedKeys(events[i].getInfo());
-            assertEquals("info map must be empty", 0, unexpectedKeys.size());
+            assertEquals("info map must be empty: " + unexpectedKeys, 0, unexpectedKeys.size());
         }
     }
 



Mime
View raw message