Skip to content

[BEAM-4086]: KafkaIO tests: Avoid busy loop in MockConsumer.poll(), reduce flakes.#5185

Merged
iemejia merged 1 commit intoapache:masterfrom
rangadi:deflake
Apr 23, 2018
Merged

[BEAM-4086]: KafkaIO tests: Avoid busy loop in MockConsumer.poll(), reduce flakes.#5185
iemejia merged 1 commit intoapache:masterfrom
rangadi:deflake

Conversation

@rangadi
Copy link
Contributor

@rangadi rangadi commented Apr 19, 2018

Add 10 millis sleep when there are no elements left in a partition. MockConsumer.poll() does not actually respect 'timeout' argument, and as result 'cosumerPollLoop() in KafkaIO kept spinning once all the records are read.

In addition, this seems to avoid flakes in testUnboundedSourceWithoutBoundedWrapper() (BEAM-4086).

@rangadi
Copy link
Contributor Author

rangadi commented Apr 19, 2018

+R: @iemejia.

@rangadi
Copy link
Contributor Author

rangadi commented Apr 20, 2018

+R: @xumingmin

@iemejia iemejia self-requested a review April 23, 2018 19:12
MockConsumer.poll() does not actually respect 'timeout' argument.
Copy link
Member

@iemejia iemejia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iemejia iemejia merged commit 229e69d into apache:master Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants