jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1440380 - /jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKDiffTest.java
Date Wed, 30 Jan 2013 12:58:18 GMT
Author: mduerig
Date: Wed Jan 30 12:58:17 2013
New Revision: 1440380

URL: http://svn.apache.org/viewvc?rev=1440380&view=rev
Log:
OAK-596: Microkernel.diff returns empty diff when there are differences
 test case

Modified:
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKDiffTest.java

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKDiffTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKDiffTest.java?rev=1440380&r1=1440379&r2=1440380&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKDiffTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKDiffTest.java
Wed Jan 30 12:58:17 2013
@@ -16,20 +16,33 @@
  */
 package org.apache.jackrabbit.mongomk.impl;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
 import org.apache.jackrabbit.mongomk.BaseMongoMicroKernelTest;
 import org.json.simple.JSONObject;
+import org.junit.Ignore;
 import org.junit.Test;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 /**
  * Tests for MicroKernel#diff
  */
 public class MongoMKDiffTest extends BaseMongoMicroKernelTest {
 
     @Test
+    @Ignore("OAK-596")
+    public void oak_596() {
+        String rev0 = mk.getHeadRevision();
+        String rev1 = mk.commit("/", "+\"node1\":{\"node2\":{\"prop1\":\"val1\",\"prop2\":\"val2\"}}",
null, null);
+        String rev2 = mk.commit("/", "^\"node1/node2/prop1\":\"val1 new\" ^\"node1/node2/prop2\":null",
null, null);
+
+        String diff = mk.diff(rev1, rev2, "/node1/node2", 0);
+        assertTrue(diff.contains("^\"/node1/node2/prop2\":null"));
+        assertTrue(diff.contains("^\"/node1/node2/prop1\":\"val1 new\""));
+    }
+
+    @Test
     public void addPathOneLevel() {
         String rev0 = mk.getHeadRevision();
 



Mime
View raw message