BewareMyPower commented on code in PR #556:
URL: https://github.com/apache/pulsar-client-cpp/pull/556#discussion_r2963754010
##########
tests/ReaderTest.cc:
##########
@@ -983,6 +978,26 @@ TEST_F(ReaderSeekTest, testSeekInclusiveChunkMessage) {
assertStartMessageId(false, secondMsgId);
}
+TEST_P(ReaderSeekTest, testSeekToEndByTimestamp) {
+ auto topic = "test-seek-to-end-by-timestamp-" +
std::to_string(time(nullptr));
+ Producer producer;
+ ASSERT_EQ(ResultOk, client.createProducer(topic, producer));
+
+ ReaderConfiguration readerConf;
+ readerConf.setStartMessageIdInclusive(GetParam());
+
+ Reader reader;
+ ASSERT_EQ(ResultOk, client.createReader(topic, MessageId::earliest(),
readerConf, reader));
+
+ ASSERT_EQ(ResultOk,
producer.send(MessageBuilder().setContent("msg").build()));
+ auto now = TimeUtils::currentTimeMillis() + 1000;
Review Comment:
To seek to a timestamp that is later than the last message.
Sorry I forgot to push the local changes when addressing
https://github.com/apache/pulsar-client-cpp/pull/556#discussion_r2960502893
--
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]