rpuch commented on code in PR #5588:
URL: https://github.com/apache/ignite-3/pull/5588#discussion_r2039756477


##########
modules/partition-replicator/src/test/java/org/apache/ignite/internal/partition/replicator/raft/snapshot/PartitionSnapshotStorageTest.java:
##########
@@ -94,4 +103,56 @@ void choosesMinimalIndexFromTxStorage(@Mock 
PartitionMvStorageAccess partitionAc
         assertEquals(3L, startupSnapshotMeta.lastIncludedIndex());
         assertEquals(2L, startupSnapshotMeta.lastIncludedTerm());
     }
+
+    @Test
+    void partitionCanBeRemovedOnlyWithoutOutgoingSnapshot(@Mock 
PartitionMvStorageAccess partitionAccess) throws IOException {

Review Comment:
   First few lines make sure that, if there is no obstacle, the storage is 
removed right away. They can be extracted to a method like 
`partitionIsRemovedRightAwayWhenThereIsNoOngoingOperation()`. The sum of the 
new test and the existing test without those lines will assert the same 
properties as the current test, but it will be a bit easier to understand what 
they assert; and, if one of them fails, it will be easier to see what is wrong. 
They don't seem to be coupled that much so that those initial lines are 
required for the 'not removed immediately' scenario



-- 
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: notifications-unsubscr...@ignite.apache.org

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

Reply via email to