stefan-egli commented on code in PR #1526:
URL: https://github.com/apache/jackrabbit-oak/pull/1526#discussion_r1683026945


##########
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentPropertyStateTest.java:
##########
@@ -297,13 +297,11 @@ private void 
getBrokenSurrogateAndInitializeDifferentStores(DocumentStoreFixture
             MongoTestUtils.setReadPreference(store, ReadPreference.primary());
         }
         DocumentNodeStore nodeStore = new 
DocumentMK.Builder().setDocumentStore(store).getNodeStore();
-        if (store instanceof MongoDocumentStore) {
-            createPropAndCheckValue(nodeStore, test, compressionEnabled);
-        } else if (store instanceof RDBDocumentStore) {
-            createPropAndCheckValue(nodeStore, test, compressionEnabled);
-        } else {
-            createPropAndCheckValue(nodeStore, test, compressionEnabled);
-        }
+
+        createPropAndCheckValue(nodeStore, test, compressionEnabled);
+
+        nodeStore.dispose();
+        store.dispose();

Review Comment:
   I would suggest to do that in a teardown or at least a finally block



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