You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/11/11 13:52:22 UTC

[GitHub] [ignite-3] rpuch commented on a diff in pull request #1331: IGNITE-18122 Track last applied term and group config in storages

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


##########
modules/page-memory/src/test/java/org/apache/ignite/internal/pagememory/persistence/PartitionMetaTest.java:
##########
@@ -41,15 +44,45 @@ void testLastAppliedIndex() {
 
         assertEquals(0, meta.lastAppliedIndex());
 
-        assertDoesNotThrow(() -> meta.lastAppliedIndex(null, 100));
+        assertDoesNotThrow(() -> meta.lastApplied(null, 100, 10));
 
         assertEquals(100, meta.lastAppliedIndex());
 
-        assertDoesNotThrow(() -> meta.lastAppliedIndex(UUID.randomUUID(), 500));
+        assertDoesNotThrow(() -> meta.lastApplied(UUID.randomUUID(), 500, 50));
 
         assertEquals(500, meta.lastAppliedIndex());
     }
 
+    @Test
+    void testLastAppliedTerm() {
+        PartitionMeta meta = new PartitionMeta();
+
+        assertEquals(0, meta.lastAppliedTerm());
+
+        assertDoesNotThrow(() -> meta.lastApplied(null, 100, 10));

Review Comment:
   When you just call a method, it's not immediately clear what you want to check here. After a second of thinking you understand: oh, they are making sure it does not explode. On the other hand, using `assertDoesNotThrow()` makes this expectation explicit. I would prefer to leave it 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.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

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