shibd commented on code in PR #22489: URL: https://github.com/apache/pulsar/pull/22489#discussion_r1562366276
########## pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentMessageFinderTest.java: ########## @@ -420,19 +423,13 @@ void testMessageExpiryWithTimestampNonRecoverableException() throws Exception { when(mock.getLastPosition()).thenReturn(PositionImpl.EARLIEST); PersistentMessageExpiryMonitor monitor = new PersistentMessageExpiryMonitor(mock, c1.getName(), c1, null); - Position previousMarkDelete = null; - for (int i = 0; i < totalEntries; i++) { - monitor.expireMessages(1); Review Comment: The original code didn't make sense to me. Here just need to call `monitor.expireMessages` once and then use Awaitility to assert markDeletePositiion. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org