zymap commented on code in PR #21032:
URL: https://github.com/apache/pulsar/pull/21032#discussion_r1299474266
##########
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/RawReaderTest.java:
##########
@@ -133,20 +137,18 @@ public void testHasMessageAvailableWithoutBatch() throws
Exception {
}
}
Assert.assertTrue(keys.isEmpty());
+ reader.closeAsync().get(3, TimeUnit.SECONDS);
}
@Test
public void testHasMessageAvailableWithBatch() throws Exception {
int numKeys = 20;
- String topic = "persistent://my-property/my-ns/my-raw-topic";
+ String topic = "persistent://my-property/my-ns/" +
BrokerTestUtil.newUniqueName("reader");
Set<String> keys = publishMessages(topic, numKeys, true);
RawReader reader = RawReader.create(pulsarClient, topic,
subscription).get();
int messageCount = 0;
while (true) {
boolean hasMsg = reader.hasMessageAvailableAsync().get();
- if (hasMsg && (messageCount == numKeys)) {
Review Comment:
Why removed the original checks? It changes the original testing purpose, no?
--
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]