denis-chudov commented on code in PR #4707:
URL: https://github.com/apache/ignite-3/pull/4707#discussion_r1841209591


##########
modules/placement-driver/src/test/java/org/apache/ignite/internal/placementdriver/LeaseUpdaterTest.java:
##########
@@ -117,19 +123,30 @@ public class LeaseUpdaterTest extends 
BaseIgniteAbstractTest {
     void setUp() {
         HybridClockImpl clock = new HybridClockImpl();
 
-        Entry entry = new EntryImpl(
+        Entry stableEntry = new EntryImpl(
                 stablePartAssignmentsKey(new TablePartitionId(1, 0)).bytes(),
                 Assignments.of(HybridTimestamp.MIN_VALUE.longValue(), 
Assignment.forPeer(node.name())).toBytes(),
                 1,
                 clock.now()
         );
 
-        when(mcEntriesCursor.iterator()).thenReturn(List.of(entry).iterator());
+        Entry pendingEntry = new EntryImpl(
+                pendingPartAssignmentsKey(new TablePartitionId(1, 0)).bytes(),
+                Assignments.of(HybridTimestamp.MIN_VALUE.longValue(), 
Assignment.forPeer(node.name())).toBytes(),
+                1,
+                clock.now()
+        );
+
+        
when(msStableAssignmentsEntriesCursor.iterator()).thenReturn(List.of(stableEntry).iterator());

Review Comment:
   I would prefer to have it as a placement driver specific unit test. 
Integration test related to other modules can be changed anytime, but since we 
extend the possibilities of placement driver, the corresponding test should 
exist for regression purposes.



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