-
Notifications
You must be signed in to change notification settings - Fork 13k
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-32963][Test] Remove flakiness from testKeyedMapStateStateMigration #23298
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! PTAL my comments.
flink-runtime/src/test/java/org/apache/flink/runtime/state/StateBackendMigrationTestBase.java
Outdated
Show resolved
Hide resolved
Thank you for your comments. I made the changes according to your suggestions. I created a separate method called sortedIterator. And I used a TreeSet. Please take another look when you have time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update.
LGTM % commit message, current message lack some infos, we could say "Fix xxx problem of xxx"
BTW, we could just mark the component tag as "state" or "test".
Could you squash all commits and rename the commit message ?
856793a
to
b9787d2
Compare
I squashed the commits and changed the commit message. I also changed the component tag to "Test" as you suggested. Please take another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I want to add that this PR not only removes flakiness from the test mentioned in the title and description (
and
All 3 tests call the function I confirmed this by checking out the versions just before and after this commit and running the NonDex tool using the following commands:
|
Update StateBackendMigrationTestBase.java2
What is the purpose of the change
This PR makes the following test stable: org.apache.flink.runtime.state.FileStateBackendMigrationTest.testKeyedMapStateStateMigration
The test is currently flaky because the order of elements returned by the iterator is non-deterministic.
This PR fixes the flaky test by making it independent of the order of elements returned by the iterator.
We detected this using the NonDex tool using the following command:
mvn edu.illinois:nondex-maven-plugin:2.1.1:nondex -pl flink-runtime -DnondexRuns=10 -Dtest=org.apache.flink.runtime.state.FileStateBackendMigrationTest#testKeyedMapStateStateMigration
Please see the following Continuous Integration log that shows the flakiness:
https://github.com/asha-boyapati/flink/actions/runs/5909136145/job/16029377793
Please see the following Continuous Integration log that shows that the flakiness is fixed by this change:
https://github.com/asha-boyapati/flink/actions/runs/5909183468/job/16029467973
The Jira ticket associated with this PR is as follows:
https://issues.apache.org/jira/browse/FLINK-32963
Brief change log
This PR fixes the flaky test by making it independent of the order of elements returned by the iterator.
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
This change only modifies a test slightly and does not change any underlying code.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation