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


##########
modules/index/src/test/java/org/apache/ignite/internal/index/IndexManagementUtilsTest.java:
##########
@@ -66,4 +86,36 @@ void testExtractIndexIdFromPartitionBuildIndexKey() {
         assertEquals(1, 
extractIndexIdFromPartitionBuildIndexKey("indexBuild.partition.1.2"));
         assertEquals(7, 
extractIndexIdFromPartitionBuildIndexKey("indexBuild.partition.7.9"));
     }
+
+    @Test
+    void testIsPrimaryReplicaTrue() {
+        TablePartitionId replicaGroupId = new TablePartitionId(1, 0);
+
+        HybridTimestamp startTime = clock.now();
+        long dayInMillis = TimeUnit.DAYS.toMillis(1);
+
+        ReplicaMeta replicaMeta = newPrimaryReplicaMeta(LOCAL_NODE, 
replicaGroupId, startTime, startTime.addPhysicalTime(dayInMillis));
+
+        assertTrue(isPrimaryReplica(replicaMeta, LOCAL_NODE, clock.now()));
+    }
+
+    @Test
+    void testIsPrimaryReplicaFalse() {

Review Comment:
   This test seems to actually have 2 test cases inside, I would split it into 
2, but it's up to you



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