You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by NicoK <gi...@git.apache.org> on 2017/07/27 16:38:06 UTC

[GitHub] flink pull request #4414: [FLINK-7287][tests] fix test instabilities in Kafk...

GitHub user NicoK opened a pull request:

    https://github.com/apache/flink/pull/4414

    [FLINK-7287][tests] fix test instabilities in KafkaConsumerTestBase

    ## What is the purpose of the change
    
    fix test instabilities in KafkaConsumerTestBase
    
    ## Brief change log
    
    * Properly ignore the `JobCancellationException` (several tests should have always failed but did not due to not waiting for the job execution thread to finish).
    * Always wait for the job execution thread to finish before checking the result of and returning from the test (although this is not strictly necessary for the tests, it may uncover any hidden failures between the cancel command and the actual cancellation but it also allows following tests to work with a clean cluster and no interfering jobs).
    
    ## Verifying this change
    
    This change is already covered by existing tests extending `KafkaConsumerTestBase`, such as `Kafka010ITCase`.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (no)
      - If yes, how is the feature documented? (not applicable)


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

    $ git pull https://github.com/NicoK/flink flink-7287

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

    https://github.com/apache/flink/pull/4414.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 #4414
    
----
commit 31f672171bd44f86c4bd31bd383077141840e2a6
Author: Nico Kruber <ni...@data-artisans.com>
Date:   2017-07-27T16:31:13Z

    [FLINK-7287][tests] fix checks ignoring a JobCancellationException

commit db4ec9f1237e704b761404b004a25df8f924e546
Author: Nico Kruber <ni...@data-artisans.com>
Date:   2017-07-27T16:32:14Z

    [FLINK-7287][tests] fix main test threads not waiting for the job execution thread to finish

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4414: [FLINK-7287][tests] fix test instabilities in KafkaConsum...

Posted by tzulitai <gi...@git.apache.org>.
Github user tzulitai commented on the issue:

    https://github.com/apache/flink/pull/4414
  
    Merging ..


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4414: [FLINK-7287][tests] fix test instabilities in Kafk...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/4414


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4414: [FLINK-7287][tests] fix test instabilities in KafkaConsum...

Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on the issue:

    https://github.com/apache/flink/pull/4414
  
    Yes, both your observations are correct. The pattern in most tests inside `KafkaConsumerTestBase` is to 
    1) start a job,
    2) do some processing, e.g. until some offset or another finish condition, including some checks
    3) cancel the job
    4) check for exceptions
    
    Since cancelling the job issues a `JobCancellationException`, this must be ignored.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4414: [FLINK-7287][tests] fix test instabilities in KafkaConsum...

Posted by tzulitai <gi...@git.apache.org>.
Github user tzulitai commented on the issue:

    https://github.com/apache/flink/pull/4414
  
    Thanks for clarifying!
    +1 to merge this to `master` and `release-1.3`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4414: [FLINK-7287][tests] fix test instabilities in KafkaConsum...

Posted by tzulitai <gi...@git.apache.org>.
Github user tzulitai commented on the issue:

    https://github.com/apache/flink/pull/4414
  
    Thanks for the fix and your notice on the instabilities @NicoK!
    
    Could you check if my understanding of the issue is correct?:
    - `Kafka010ITCase.testCommitOffsetsToKafka` was failing on `JobCancellationException`, whereas that exception signals success and should be ignored.
    - We were "incorrectly passing" before only because we didn't properly wait for the job to be cancelled.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---