Skip to content

[FLINK-40568][tests] Fix flaky ProcessTableFunctionSemanticTests by using materialized data assertion - #29117

Open
spuru9 wants to merge 1 commit into
apache:masterfrom
spuru9:FLINK-40568
Open

[FLINK-40568][tests] Fix flaky ProcessTableFunctionSemanticTests by using materialized data assertion#29117
spuru9 wants to merge 1 commit into
apache:masterfrom
spuru9:FLINK-40568

Conversation

@spuru9

@spuru9 spuru9 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Fixes the flaky ProcessTableFunctionSemanticTests for the process-updating-multi-input program, which intermittently fails in CI with an output mismatch:

Expecting actual:
  ["+I[Bob, score 2 in city London]", "+U[Bob, score 2 in city Berlin]"]
to contain exactly in any order:
  ["+I[Bob, score 5 in city London]", "+I[Alice, score 2 in city Zurich]",
   "+U[Bob, score 3 in city London]", "+U[Bob, score 3 in city Berlin]",
   "-D[Bob, null]", "+I[Bob, score 2 in city Berlin]", "-D[Alice, null]"]

The program runs the two-input updating PTF join UpdatingJoinFunction and asserts the sink's raw changelog. A two-input operator interleaves its two inputs nondeterministically, so the emitted changelog is not fixed — the test pinned one interleaving, and an alternate order fails the assertion. The final materialized (upsert) result is the same either way.

Brief change log

Test-only change; no production code is touched.

Verifying this change

The job is awaited to completion, then the sink result is checked. The materialized upsert result is order-independent (Bob → score 2 in city Berlin, Alice deleted), so it no longer depends on cross-input arrival order.

  • ProcessTableFunctionSemanticTests (72 cases) passed a repeated local loop on the same commit that failed in CI (JDK 17), with the process-updating-multi-input case green every time.

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? not applicable

AI usage disclosure

  • Claude Code

…sing materialized data assertion

The process-updating-multi-input program runs the two-input updating PTF
join UpdatingJoinFunction and asserted the sink's raw changelog. A two-input
operator interleaves its two inputs nondeterministically, so the emitted
changelog is not fixed and the pinned expectation failed intermittently in CI.

Assert the materialized upsert result via SinkTestStep#testMaterializedData()
instead, which converges regardless of cross-input arrival order. This mirrors
FLINK-39729 and the multi-input join test programs.

Generated-by: Claude Code (claude-opus-4-8)
@flinkbot

flinkbot commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

CI report:

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

@spuru9
spuru9 marked this pull request as draft September 10, 2026 16:32
@spuru9
spuru9 marked this pull request as ready for review September 10, 2026 16:32
@spuru9

spuru9 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

@spuru9

spuru9 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants