showuon commented on a change in pull request #9775:
URL: https://github.com/apache/kafka/pull/9775#discussion_r547085943



##########
File path: core/src/test/scala/integration/kafka/api/PlaintextConsumerTest.scala
##########
@@ -801,8 +801,10 @@ class PlaintextConsumerTest extends BaseConsumerTest {
     awaitAssignment(consumer, partitions.toSet)
 
     val producer = createProducer()
-    val producerRecords = partitions.flatMap(sendRecords(producer, numRecords 
= 15, _))
-    val consumerRecords = consumeRecords(consumer, producerRecords.size)
+    // we produce 10 records for each topic partition. There are 3 topics, and 
30 partitions each topic,
+    // so total producerRecords size should be 10 * 3 * 30 = 900
+    val producerRecords = partitions.flatMap(sendRecords(producer, numRecords 
= 10, _))
+    val consumerRecords = consumeRecords(consumer, producerRecords.size, 
waitTimeMs = 90 * 1000)

Review comment:
       revert back to 60 secs now.

##########
File path: core/src/test/scala/integration/kafka/api/AbstractConsumerTest.scala
##########
@@ -148,16 +148,17 @@ abstract class AbstractConsumerTest extends 
BaseRequestTest {
 
   protected def consumeRecords[K, V](consumer: Consumer[K, V],
                                      numRecords: Int,
-                                     maxPollRecords: Int = Int.MaxValue): 
ArrayBuffer[ConsumerRecord[K, V]] = {
+                                     maxPollRecords: Int = Int.MaxValue,
+                                     waitTimeMs: Int = 60000): 
ArrayBuffer[ConsumerRecord[K, V]] = {
     val records = new ArrayBuffer[ConsumerRecord[K, V]]

Review comment:
       Nice catch! Updated. Thanks.




----------------------------------------------------------------
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:
[email protected]


Reply via email to