flink icon indicating copy to clipboard operation
flink copied to clipboard

Fixed Flaky test in org.apache.flink.table.planner.plan.hints.stream.StateTtlHintTest#testStateTtlHintWithJoinHint

Open Mukta13 opened this issue 1 year ago • 1 comments

What is the purpose of the change Fixing flaky test in org.apache.flink.table.planner.plan.hints.stream.StateTtlHintTest#testStateTtlHintWithJoinHint. This flaky test sometimes fails due to the indeterministic ordering of the ‘options’ in the optimized query plan that is produced while the verify() function within the testStateTtlHintWithJoinHint() test case is invoked in the StateTtlHintTest.java file.

Brief change log The test case testStateTtlHintWithJoinHint() passes the sql query to a verify() function in oder to test for the optimized query plan The verify() function in turn calls a doVerifyPlan() function which is defined within the TableTestBase.scala file. The doVerifyPlan() in turn invokes assertPlanEquals() function which in turn invokes assertEqualsOrExpand() function Since the optimized query plan is being produced and tested finally within this assertEqualsOrExpand() function, all my changes have being implemented within this function only. I have normalized the actual and expected values so that the ‘options’ are always sorted through regex before the final assertion takes place

Verifying this change

This change can be tested using this command: mvn -pl flink-table/flink-table-planner edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=org.apache.flink.table.planner.plan.hints.stream.StateTtlHintTest#testStateTtlHintWithJoinHint -DnondexRuns=10.

This confirms that the test passes for all the 10 nondex iterations.

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, Kubernetes/Yarn, 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? No

Mukta13 avatar Oct 04 '24 19:10 Mukta13

CI report:

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

flinkbot avatar Oct 04 '24 19:10 flinkbot

This PR is being marked as stale since it has not had any activity in the last 90 days. If you would like to keep this PR alive, please leave a comment asking for a review. If the PR has merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out to the community, contact details can be found here: https://flink.apache.org/what-is-flink/community/

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

github-actions[bot] avatar Apr 08 '25 06:04 github-actions[bot]

This PR has been closed since it has not had any activity in 120 days. If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open the PR and ask for a review.

github-actions[bot] avatar May 09 '25 06:05 github-actions[bot]