showuon commented on a change in pull request #8885: URL: https://github.com/apache/kafka/pull/8885#discussion_r444938895
########## File path: core/src/test/scala/integration/kafka/api/PlaintextConsumerTest.scala ########## @@ -800,7 +800,7 @@ class PlaintextConsumerTest extends BaseConsumerTest { awaitAssignment(consumer, partitions.toSet) val producer = createProducer() - val producerRecords = partitions.flatMap(sendRecords(producer, partitionCount, _)) + val producerRecords = partitions.flatMap(sendRecords(producer, numRecords = 15, _)) Review comment: hi @omkreddy , no, with this change, we won't **only sent to 15 partitions** . The variable `partitions` in this line, is the total partitions in all topics, that is, we have 3 topics, and 30 partitions for each in the test, and the variable `partitions` is with size of 90. And here, we send the records to all the 90 partitions with `numRecords` records for each. So, in the test, we first collect all the partitions ``` def testLowMaxFetchSizeForRequestAndPartition(): Unit = { val topic1 = "topic1" val topic2 = "topic2" val topic3 = "topic3" val partitionCount = 30 val topics = Seq(topic1, topic2, topic3) .... // we collect all the TopicPartition info, that is, the partitions.size() will be 90 val partitions = topics.flatMap { topic => (0 until partitionCount).map(new TopicPartition(topic, _)) } .... // so later, we send the records to all the 90 partitions with `numRecords` records for each. // that is, the change to the number of the records sent won't affect the test itself val producerRecords = partitions.flatMap(sendRecords(producer, partitionCount, _)) ... } ``` Thank you. ---------------------------------------------------------------- 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: us...@infra.apache.org