You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ma...@apache.org on 2020/07/23 04:34:04 UTC

[kafka] branch trunk updated: KAFKA-8264: decrease the record size for flaky test

This is an automated email from the ASF dual-hosted git repository.

manikumar pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 9b36de3  KAFKA-8264: decrease the record size for flaky test
9b36de3 is described below

commit 9b36de3abbf70f81437341ef1df0c14f0d8e48c4
Author: Luke Chen <sh...@gmail.com>
AuthorDate: Thu Jul 23 10:02:54 2020 +0530

    KAFKA-8264: decrease the record size for flaky test
    
    This flaky test exists for a long time, and it happened more frequently recently. (also happened in my PR testing!! :(  ) In KAFKA-8264 and KAFKA-8460, it described the issue for this test is that
    > Timed out before consuming expected 2700 records. The number consumed was xxxx
    
    I did some investigation. This test is to test:
    > we consume all partitions if fetch max bytes and max.partition.fetch.bytes are low.
    
    And what it did, is to create 3 topics and 30 partitions for each. And then, iterate through all 90 partitions to send 30 records for each. Finally, verify the we can consume all the records successfully.
    
    What the error message saying is that it cannot consume all the records in time (might be the busy system) So, we can actually decrease the record size to avoid it. I checked all the error messages we collected in KAFKA-8264 and KAFKA-8460, the failed cases can always consume at least 1440 up (total is 2700). So, I set the records half size of the original setting, it'll become 1350 records in total. It should make this test more stable.
    
    Author: Luke Chen <sh...@gmail.com>
    
    Reviewers: Manikumar Reddy <ma...@gmail.com>
    
    Closes #8885 from showuon/KAFKA-8264
---
 core/src/test/scala/integration/kafka/api/PlaintextConsumerTest.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/test/scala/integration/kafka/api/PlaintextConsumerTest.scala b/core/src/test/scala/integration/kafka/api/PlaintextConsumerTest.scala
index 8d9ecd5..4d8c160 100644
--- a/core/src/test/scala/integration/kafka/api/PlaintextConsumerTest.scala
+++ b/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, _))
     val consumerRecords = consumeRecords(consumer, producerRecords.size)
 
     val expected = producerRecords.map { record =>