shodaaan commented on code in PR #1539: URL: https://github.com/apache/jackrabbit-oak/pull/1539#discussion_r1650889773
########## oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCTest.java: ########## @@ -531,6 +531,57 @@ public void testResetFullGCDryRunMode() throws Exception { // OAK-10370 END + // OAK-10896 + + @Test + public void testVersionGCLoadGCModeConfigurationNotApplicable() throws Exception { + int fullGcModeNotAllowedValue = 5; + int fullGcModeGapOrphans = 2; + + // set fullGcMode to allowed value that is different than NONE + VersionGarbageCollector.setFullGcMode(fullGcModeGapOrphans); + + // reinitialize VersionGarbageCollector with not allowed value + VersionGarbageCollector gc = new VersionGarbageCollector( + ns, new VersionGCSupport(store), true, false, false, + fullGcModeNotAllowedValue); + + assertEquals("Starting VersionGarbageCollector with not applicable / not allowed value" + + "will set fullGcMode to default NONE", gc.getFullGcMode(), VersionGarbageCollector.FullGCMode.NONE); Review Comment: Fixed the comment, unit tests and static change, thank you for the suggestions -- 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: oak-dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org