Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-15427][Statebackend][test] Check TTL test in test_stream_statettl.sh and skip the exception check #10726

Closed
wants to merge 3 commits into from

Conversation

klion26
Copy link
Member

@klion26 klion26 commented Dec 31, 2019

What is the purpose of the change

Add test check logic in test_stream_state_ttl.sh for TTL end-to-end test, and skip the exception check for those tests.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

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)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 461a277 (Tue Dec 31 02:05:59 UTC 2019)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!
  • Invalid pull request title: No valid Jira ID provided

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Dec 31, 2019

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

@klion26 klion26 changed the title [BLINK-15427][Statebackend][test] Check TTL test in test_stream_statettl.sh and skip the exception check [FLINK-15427][Statebackend][test] Check TTL test in test_stream_statettl.sh and skip the exception check Dec 31, 2019
@klion26
Copy link
Member Author

klion26 commented Dec 31, 2019

@flinkbot run travis
@flinkbot run azure

Copy link
Member

@carp84 carp84 left a comment

Choose a reason for hiding this comment

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

+1, the solution follows similar pattern as #10588 and could verify the result correctly according to the source code of TtlVerifyUpdateFunction#flatMap

@carp84
Copy link
Member

carp84 commented Dec 31, 2019

Minor: changing TtlVerifyUpdateFunction#flatMap to add some specific error message and verify through it could decouple the case from implementation of TtlVerificationContext#toString, the change would be like: out.collect("TTL verification failed: " + verificationContext.toString()); and then check against TTL verification failed, wdyt? @klion26

@klion26
Copy link
Member Author

klion26 commented Dec 31, 2019

@carp84 thanks for the review. Add specific error message and check against it is better(I also add a comment to remind others do not change this specific error message). After adding the specific error message we would not get a false pass even if somebody changes the TtlVerificationContext#toString.

@klion26
Copy link
Member Author

klion26 commented Dec 31, 2019

ran the end-to-end test locally

  1. test succeed
Checking of logs skipped.

[PASS] 'State TTL Heap backend end-to-end test' passed after 0 minutes and 28 seconds! Test exited with exit code 0.

.......

Checking of logs skipped.

[PASS] 'State TTL RocksDb backend end-to-end test' passed after 0 minutes and 27 seconds! Test exited with exit code 0.

2 comment the if-check in TtlVerifyUpdateFunction#flatMap to simulate the fail, it will fail

[FAIL] Test script contains errors.
Checking of logs skipped.

[FAIL] 'State TTL Heap backend end-to-end test' failed after 0 minutes and 42 seconds! Test exited with exit code 1

@klion26
Copy link
Member Author

klion26 commented Jan 2, 2020

The Travis test failed because of another irrelevant issue(has been tracked by FLINK-15247)

Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Thanks for hardening this end-to-end test case @klion26. I think we are still missing some call sites of test_stream_state_ttl.sh. Once this is updated, we can move forward with merging this PR.

@tillrohrmann tillrohrmann self-assigned this Jan 2, 2020
@klion26
Copy link
Member Author

klion26 commented Jan 3, 2020

@tillrohrmann thanks for the review. addressed the comments, PTAL, thanks~

Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my comments @klion26. LGTM. Merging this PR now.

tillrohrmann pushed a commit that referenced this pull request Jan 3, 2020
…_ttl.sh and skip the exception check

Add some specific error message in TtlVerifyUpdateFunction and use it to verify the test

This closes #10726.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants