jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1350649 - /jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
Date Fri, 15 Jun 2012 15:10:39 GMT
Author: stefan
Date: Fri Jun 15 15:10:38 2012
New Revision: 1350649

URL: http://svn.apache.org/viewvc?rev=1350649&view=rev
Log:
OAK-142: MicroKernel API: returning the :hash property should be optional

Modified:
    jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java

Modified: jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java?rev=1350649&r1=1350648&r2=1350649&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
(original)
+++ jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
Fri Jun 15 15:10:38 2012
@@ -420,8 +420,12 @@ public class MicroKernelIT extends Abstr
         obj = parseJSONObject(mk.getNodes("/", null, 1, 0, -1, "{properties:[\"*\",\":hash\"]}"));
         assertPropertyValue(obj, "test/booleanProp", true);
 
+        if (obj.get(":hash") == null) {
+            // :hash is optional, an implementation might not support it
+            return;
+        }
+
         assertPropertyExists(obj, ":hash", String.class);
-        assertPropertyExists(obj, "test/:hash", String.class);
         String hash0 = (String) resolveValue(obj, ":hash");
 
         // modify a property and verify that the hash of the root node changed
@@ -430,7 +434,6 @@ public class MicroKernelIT extends Abstr
         assertPropertyValue(obj, "test/booleanProp", false);
 
         assertPropertyExists(obj, ":hash", String.class);
-        assertPropertyExists(obj, "test/:hash", String.class);
         String hash1 = (String) resolveValue(obj, ":hash");
 
         assertFalse(hash0.equals(hash1));
@@ -442,7 +445,6 @@ public class MicroKernelIT extends Abstr
         assertPropertyValue(obj, "test/booleanProp", true);
 
         assertPropertyExists(obj, ":hash", String.class);
-        assertPropertyExists(obj, "test/:hash", String.class);
         String hash2 = (String) resolveValue(obj, ":hash");
 
         assertFalse(hash1.equals(hash2));



Mime
View raw message