lhotari commented on code in PR #23129:
URL: https://github.com/apache/pulsar/pull/23129#discussion_r1716537548
##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/NonDurableSubscriptionTest.java:
##########
@@ -542,18 +545,34 @@ public void testReaderInitAtDeletedPosition() throws
Exception {
.getStats(topicName, true, true,
true).getSubscriptions().get("s1");
log.info("backlog size: {}", subscriptionStats.getMsgBacklog());
assertEquals(subscriptionStats.getMsgBacklog(), 0);
- ManagedLedgerInternalStats.CursorStats cursorStats =
-
admin.topics().getInternalStats(topicName).cursors.get("s1");
+ PersistentTopicInternalStats internalStats =
admin.topics().getInternalStats(topicName);
+ ManagedLedgerInternalStats.CursorStats cursorStats =
internalStats.cursors.get("s1");
String[] ledgerIdAndEntryId =
cursorStats.markDeletePosition.split(":");
- Position actMarkDeletedPos =
-
PositionFactory.create(Long.valueOf(ledgerIdAndEntryId[0]),
Long.valueOf(ledgerIdAndEntryId[1]));
- Position expectedMarkDeletedPos =
-
PositionFactory.create(msgIdInDeletedLedger5.getLedgerId(),
msgIdInDeletedLedger5.getEntryId());
+ ImmutablePositionImpl actMarkDeletedPos =
+ new
ImmutablePositionImpl(Long.valueOf(ledgerIdAndEntryId[0]),
Long.valueOf(ledgerIdAndEntryId[1]));
+ ImmutablePositionImpl expectedMarkDeletedPos =
+ new
ImmutablePositionImpl(msgIdInDeletedLedger5.getLedgerId(),
msgIdInDeletedLedger5.getEntryId());
+ log.info("LAC: {}", internalStats.lastConfirmedEntry);
log.info("Expected mark deleted position: {}",
expectedMarkDeletedPos);
log.info("Actual mark deleted position: {}",
cursorStats.markDeletePosition);
- assertTrue(actMarkDeletedPos.compareTo(expectedMarkDeletedPos) >=
0);
+
AssertJUnit.assertTrue(actMarkDeletedPos.compareTo(expectedMarkDeletedPos) >=
0);
Review Comment:
AssertJUnit shouldn't be needed
--
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]