sashapolo commented on code in PR #3446:
URL: https://github.com/apache/ignite-3/pull/3446#discussion_r1532269753
##########
modules/page-memory/src/test/java/org/apache/ignite/internal/pagememory/persistence/store/FilePageStoreManagerTest.java:
##########
@@ -525,13 +525,33 @@ void testAddStore() throws Exception {
);
}
+ @Test
+ void testDestroyGroupIfExists() throws Exception {
+ FilePageStoreManager manager = createManager();
+
+ manager.start();
+
+ int groupId = 1;
+
+ Path dbDir = workDir.resolve("db");
+
+ // Directory does not exist.
+ assertDoesNotThrow(() -> manager.destroyGroupIfExists(groupId));
+ assertThat(collectAllSubFileAndDirs(dbDir), empty());
+
+ createAndAddFilePageStore(manager, new GroupPartitionId(groupId, 0));
+ manager.destroyGroupIfExists(groupId);
+ assertThat(collectAllSubFileAndDirs(dbDir), empty());
Review Comment:
You should probably validate that the directory is not empty before you call
this method
--
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]