mreutegg commented on code in PR #702:
URL: https://github.com/apache/jackrabbit-oak/pull/702#discussion_r971762034
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java:
##########
@@ -130,6 +130,15 @@ public NodeState merge(@NotNull CommitHook hook, @NotNull
CommitInfo info)
return merge0(hook, info, true);
}
+ /**
+ * For test purposes only!
+ * <p>
+ * Forces the branch to persist the changes to the underlying store.
+ */
+ void persist() {
+ branchState.persist();
+ }
+
Review Comment:
Can you please move this method further down and place it between
`getMergeLock()` and `merge0()`? This matches the location in trunk and reduces
potential conflicts in the future when further changes a ported back.
##########
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/TestUtils.java:
##########
@@ -93,6 +93,14 @@ public static DocumentNodeState asDocumentState(NodeState
state){
return null;
}
+ public static void persistToBranch(NodeBuilder builder) {
+ if (builder instanceof DocumentRootBuilder) {
+ ((DocumentRootBuilder) builder).persist();
+ return;
+ }
+ fail("Not of type DocumentRootBuilder: " +
builder.getClass().getName());
+ }
+
Review Comment:
Similar as above, can you please move this method between
`resetRevisionClockToDefault()` and `disposeQuietly()`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]