GitHub user rangadi opened a pull request:

    https://github.com/apache/incubator-beam/pull/237

    [BEAM-220] fix flaky KafkaIO test

    Fix a flaky KafkaIO test.
    
    KafkaIO reader reads from Kafka in a separate thread. As a result, 
`start()` or `advance()` might not read a record with in 10 millis timeout even 
from the mock kafka consumer. Updated one test that manually reads from KafkaIO 
reader to invoke `advance()` in a loop.
    
    This should fix the flaky test. I am running these tests in a loop on my 
desktop to verify. One thing I can not explain is the following log from the 
failed jenkins build linked in BEAM-220 (the log was same when I reproduced it 
locally):
    
        Apr 22, 2016 7:04:10 AM 
org.apache.beam.sdk.io.kafka.KafkaIO$UnboundedKafkaReader advance
        INFO: Reader-0: first record offset 0
    
    It is entirely clear if this is from the failed test, but `first record 
offset 0` implies the `start()` must have returned true.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rangadi/incubator-beam flaky

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-beam/pull/237.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #237
    
----
commit f00517e0771a4ca0a71170b7bd08146ffbf0bee2
Author: Raghu Angadi <rang...@google.com>
Date:   2016-04-25T18:43:48Z

    fix flaky KafkaIO test

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to