You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by GitBox <gi...@apache.org> on 2022/10/27 14:25:28 UTC

[GitHub] [jackrabbit-oak] rishabhdaim commented on a diff in pull request #739: OAK-9967 : handled case to send lease update time in case of exception

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


##########
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java:
##########
@@ -413,6 +418,63 @@ public void throttlingWrapperCreatedWhenThrottlingIsEnabled_2() {
     }
     // END -- OAK-9909
 
+    // OAK-9967
+    @Test
+    public void renewClusterIdLeaseTrue() throws IllegalAccessException {
+        DocumentStore documentStore = new MemoryDocumentStore();
+
+        DocumentNodeStoreStatsCollector statsCollector = mock(DocumentNodeStoreStatsCollector.class);
+        doNothing().when(statsCollector).doneLeaseUpdate(anyLong());
+
+        ClusterNodeInfo clusterNodeInfo = mock(ClusterNodeInfo.class);
+        when(clusterNodeInfo.renewLease()).thenReturn(true);
+
+        DocumentNodeStore nodeStore = builderProvider.newBuilder().setNodeStoreStatsCollector(statsCollector)

Review Comment:
   @mreutegg I have indeed used the `builderProvider` of `DocumentMKBuilderProvider`.



-- 
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-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org