You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/04/13 23:30:18 UTC

[GitHub] [pinot] walterddr commented on a diff in pull request #8538: fix pulsar test instability

walterddr commented on code in PR #8538:
URL: https://github.com/apache/pinot/pull/8538#discussion_r849972145


##########
pinot-plugins/pinot-stream-ingestion/pinot-pulsar/src/test/java/org/apache/pinot/plugin/stream/pulsar/PulsarConsumerTest.java:
##########
@@ -273,13 +269,31 @@ public void testPartitionLevelConsumerBatchMessages()
     }
   }
 
-  public MessageId getMessageIdForPartitionAndIndex(int partitionNum, int index) {
+  private static MessageBatch consumeMessageBatch(PartitionGroupConsumer consumer, MessageId startMsgId,
+      MessageId endMsgId, int expectedMsgCount)
+      throws TimeoutException {
+    int retryCount = 0;
+    MessageBatch messageBatch = null;
+    while (retryCount < DEFAULT_RETRY_COUNT) {
+      retryCount++;
+      messageBatch = consumer.fetchMessages(new MessageIdStreamOffset(startMsgId),

Review Comment:
   I dunno why this fixes the bug. My guess is that pulsar flush is async but I am not sure. 
   
   GitHub Actions sometimes catch interesting bug b/c the machines are much less powerful



-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org