thomasmueller commented on code in PR #741: URL: https://github.com/apache/jackrabbit-oak/pull/741#discussion_r1010201797
########## oak-lucene/src/test/java/org/apache/jackrabbit/oak/composite/blueGreen/Persistence.java: ########## @@ -138,15 +140,22 @@ public static Persistence openComposite(File globalDir, File libsDir, Config con FileStore globalFileStore = openFileStore(globalDir, config.blobStore); result.fileStores.add(globalFileStore); SegmentNodeStore globalStore = openSegmentStore(globalFileStore); - NodeStore cn = new CompositeNodeStore.Builder( + result.compositeNodestore = new CompositeNodeStore.Builder( MOUNT_INFO_PROVIDER, globalStore).addMount("libs", libsStore). setPartialReadOnly(true).build(); - result.repository = openRepsitory(cn, config.indexDir); + result.repository = openRepsitory(result.compositeNodestore, config.indexDir); result.session = result.repository.login(createCredentials()); return result; } + public NodeStore getCompositeNodestore() throws Exception { + if (compositeNodestore == null){ Review Comment: Nitpick: space before { is missing ########## oak-lucene/src/test/java/org/apache/jackrabbit/oak/composite/blueGreen/IndexUtils.java: ########## @@ -147,4 +155,38 @@ public static void checkLibsIsReadOnly(Persistence p) throws RepositoryException } } + public static boolean isIndexDisabledAndHiddenNodesDeleted(NodeStore store, String path) throws CommitFailedException { + NodeState nodeState = NodeStateUtils.getNode(store.getRoot(), path); + if (!nodeState.getProperty("type").getValue(Type.STRING).equals("disabled")) { Review Comment: Comment: getProperty could return null, but as this is just a test, I think it's fine and we don't need to check for null. But in production code, we would need to verify. In the test case, I actually prefer shorter / simpler code, even if it's slightly dangerous. The only problem is when someone moves the code to /src/main. What about adding a comment // could throw NPE, but we don't care as it's a test So this won't be forgotten when the code is moved -- 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: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org