rishabhdaim commented on code in PR #858:
URL: https://github.com/apache/jackrabbit-oak/pull/858#discussion_r1124127355


##########
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDocumentStoreTest.java:
##########
@@ -241,6 +242,30 @@ public void queryWithLimit() throws Exception {
         store.dispose();
     }
 
+    @Test
+    public void queryWithProjections() {
+        DocumentStore docStore = openDocumentStore();
+        DocumentNodeStore store = new DocumentMK.Builder()
+                .setDocumentStore(docStore).setAsyncDelay(0).getNodeStore();
+        Revision rev = Revision.newRevision(0);
+        List<UpdateOp> inserts = new ArrayList<UpdateOp>();
+        for (int i = 0; i < DocumentMK.MANY_CHILDREN_THRESHOLD * 2; i++) {
+            DocumentNodeState n = new DocumentNodeState(store, 
Path.fromString("/node-" + i),
+                    new RevisionVector(rev));
+            inserts.add(n.asOperation(rev));
+        }
+        docStore.create(Collection.NODES, inserts);
+        List<NodeDocument> docs = docStore.query(Collection.NODES,
+                Utils.getKeyLowerLimit(Path.ROOT),  
Utils.getKeyUpperLimit(Path.ROOT), null, 0,
+                DocumentMK.MANY_CHILDREN_THRESHOLD, Lists.newArrayList(ID));
+        // since both _id & _modCount are mandatory, so data size should be 2

Review Comment:
   This won't be required after we make changes regarding putting documents 
into cache.



-- 
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]

Reply via email to