You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/08/23 16:29:08 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #5023: `hasMessageAvailable` should return false when Reader read from latest messages

merlimat commented on a change in pull request #5023: `hasMessageAvailable` should return false when Reader read from latest messages
URL: https://github.com/apache/pulsar/pull/5023#discussion_r317209477
 
 

 ##########
 File path: pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ReaderTest.java
 ##########
 @@ -111,6 +111,10 @@ private void testReadMessages(String topic, boolean enableBatch) throws Exceptio
             Assert.assertTrue(keys.remove(message.getKey()));
         }
         Assert.assertTrue(keys.isEmpty());
+
+        Reader<byte[]> readLatest = pulsarClient.newReader().topic(topic).startMessageId(MessageId.latest)
+                                                .readerName(subscription + "latest").create();
+        Assert.assertFalse(readLatest.hasMessageAvailable());
 
 Review comment:
   Can you add the test for both the default case and when `startMessageInclusive()` is set?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services