vadimkolodingg commented on code in PR #5332: URL: https://github.com/apache/ignite-3/pull/5332#discussion_r1981308063
########## modules/placement-driver/src/test/java/org/apache/ignite/internal/placementdriver/LeaseUpdaterTest.java: ########## @@ -301,11 +288,69 @@ public void testLeaseAmongPendings() throws Exception { Lease lease = awaitForLease(); assertEquals(pendingNode.name(), lease.getLeaseholder()); + } - leaseUpdater.deactivate(); + @Test + public void testLeaseAmongPendingsSkipsLearners() throws Exception { + var peer = Assignment.forPeer("test-node-pending-peer"); + var learner = Assignment.forLearner("test-node-pending-learner"); + + // no stable, pending peer and learner + mockTopology(Set.of(), Set.of(peer, learner)); + + Lease lease = awaitForLease(); + + assertEquals(peer.consistentId(), lease.getLeaseholder()); + + // no stable, pending learner only + mockTopology(Set.of(), Set.of(learner)); + + assertThrows(AssertionError.class, this::awaitForLease); Review Comment: done -- 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