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

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


The following commit(s) were added to refs/heads/2.3 by this push:
     new 71e2019  KAFKA-8800: Increase poll timeout in poll[Records]UntilTrue 
(#7211)
71e2019 is described below

commit 71e20193e1fe70e10e4c6961a6db14768f6e0c88
Author: Lee Dongjin <[email protected]>
AuthorDate: Sun Aug 18 01:27:35 2019 +0900

    KAFKA-8800: Increase poll timeout in poll[Records]UntilTrue (#7211)
    
    If retrieving metadata during `poll(Duration)` repeatedly takes longer than 
the
    poll timeout, we don't make progress and `waitUntilTrue` eventually times 
out
    causing the test to fail. This behaviour differs from the older 
`poll(long)` that
    would block until metadata retrieval had completed. The flakiness was likely
    introduced when we switched from the latter to the former.
    
    Reviewers: Ismael Juma <[email protected]>
---
 core/src/test/scala/unit/kafka/utils/TestUtils.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/src/test/scala/unit/kafka/utils/TestUtils.scala 
b/core/src/test/scala/unit/kafka/utils/TestUtils.scala
index 59ee426..a7fd95c 100755
--- a/core/src/test/scala/unit/kafka/utils/TestUtils.scala
+++ b/core/src/test/scala/unit/kafka/utils/TestUtils.scala
@@ -752,7 +752,7 @@ object TestUtils extends Logging {
                     msg: => String,
                     waitTimeMs: Long = JTestUtils.DEFAULT_MAX_WAIT_MS): Unit = 
{
     waitUntilTrue(() => {
-      consumer.poll(Duration.ofMillis(50))
+      consumer.poll(Duration.ofMillis(100))
       action()
     }, msg = msg, pause = 0L, waitTimeMs = waitTimeMs)
   }
@@ -762,7 +762,7 @@ object TestUtils extends Logging {
                                  msg: => String,
                                  waitTimeMs: Long = 
JTestUtils.DEFAULT_MAX_WAIT_MS): Unit = {
     waitUntilTrue(() => {
-      val records = consumer.poll(Duration.ofMillis(50))
+      val records = consumer.poll(Duration.ofMillis(100))
       action(records)
     }, msg = msg, pause = 0L, waitTimeMs = waitTimeMs)
   }

Reply via email to