Joscorbe commented on a change in pull request #243:
URL: https://github.com/apache/jackrabbit-oak/pull/243#discussion_r461607090



##########
File path: 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
##########
@@ -3160,6 +3187,22 @@ private void signalClusterStateChange() {
         }
     }
 
+    /**
+     * FOR TESTING ONLY :
+     * stops the backgroundUpdateThread (by overwriting its
+     * isDisposed flag) and optionally waits for the thread to
+     * terminate.
+     * @param timeoutMillis optional amount of millis to wait for the thread 
to terminate at max
+     * @return true if thread is no longer running
+     */
+    boolean stopBackgroundUpdateThread(long timeoutMillis) throws 
InterruptedException {

Review comment:
       I tried to think about a more elegant way to do this, maybe using 
Reflection in the test, but after discussing with @stefan-egli this is probably 
the clearer way to do this.
   I think it would be interesting to have a second opinion here.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to