You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ch...@apache.org on 2016/10/19 15:10:15 UTC
svn commit: r1765638 -
/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java
Author: chetanm
Date: Wed Oct 19 15:10:14 2016
New Revision: 1765638
URL: http://svn.apache.org/viewvc?rev=1765638&view=rev
Log:
OAK-1312 - [bundling] Bundle nodes into a document
Avoid using DocumentNodeState compareAgainstBaseState and rely default implementation
Modified:
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java
Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java?rev=1765638&r1=1765637&r2=1765638&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java Wed Oct 19 15:10:14 2016
@@ -41,9 +41,9 @@ import org.apache.jackrabbit.oak.plugins
import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
import org.apache.jackrabbit.oak.spi.commit.EmptyHook;
import org.apache.jackrabbit.oak.spi.state.AbstractNodeState;
-import org.apache.jackrabbit.oak.spi.state.EqualsDiff;
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.apache.jackrabbit.oak.spi.state.NodeStateDiff;
import org.apache.jackrabbit.oak.spi.state.NodeStateUtils;
import org.junit.Before;
import org.junit.Rule;
@@ -548,7 +548,7 @@ public class DocumentBundlingTest {
}
}
- private static class AssertingDiff extends EqualsDiff {
+ private static class AssertingDiff implements NodeStateDiff {
private final Set<String> ignoredProps = ImmutableSet.of(
DocumentBundlor.META_PROP_PATTERN,
META_PROP_BUNDLED_CHILD,
@@ -586,6 +586,11 @@ public class DocumentBundlingTest {
}
@Override
+ public boolean childNodeChanged(String name, NodeState before, NodeState after) {
+ return AbstractNodeState.compareAgainstBaseState(after, before, new AssertingDiff());
+ }
+
+ @Override
public boolean childNodeDeleted(String name, NodeState before) {
throw new AssertionError(format("Deleted child : %s - %s", name, before));
}