You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ij...@apache.org on 2019/08/17 16:27:53 UTC
[kafka] branch trunk updated: KAFKA-8800: Increase poll timeout in
poll[Records]UntilTrue (#7211)
This is an automated email from the ASF dual-hosted git repository.
ijuma 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 784f7e8 KAFKA-8800: Increase poll timeout in poll[Records]UntilTrue (#7211)
784f7e8 is described below
commit 784f7e84edea548ef76008dddc750ac650479755
Author: Lee Dongjin <do...@apache.org>
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 <is...@juma.me.uk>
---
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 59427c1..9091dcb 100755
--- a/core/src/test/scala/unit/kafka/utils/TestUtils.scala
+++ b/core/src/test/scala/unit/kafka/utils/TestUtils.scala
@@ -769,7 +769,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)
}
@@ -779,7 +779,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)
}