Skip to content

[hotfix][java][python] Simplify tests and remove timing assumptions - #1451

Open
wenjin272 wants to merge 2 commits into
apache:mainfrom
wenjin272:codex/python-test-timing-cleanup
Open

wenjin272 wants to merge 2 commits into
apache:mainfrom
wenjin272:codex/python-test-timing-cleanup

Conversation

@wenjin272

@wenjin272 wenjin272 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Purpose of change

Remove redundant tests and scheduling-speed assumptions while retaining checks of Flink Agents behavior. This is a test-only hotfix; production code is unchanged.

  • Replace Python gather timing bounds and Java concurrency speed/order assertions with barriers. Calls must enter together before they can finish; the tool batch still verifies peak concurrency and every returned result. Barrier timeouts only bound a stalled test.
  • Verify directly that an existing recovery release marker avoids polling sleep, and remove a redundant wait after executor shutdown.
  • Remove five tests of cloudpickle itself, a duplicate event identity test, and an internal Action JSON fixture whose only contract was a NullPointerException.
  • Reduce the decision bridge's invalid-envelope matrix to one representative protocol rejection. Remove the exhaustive per-field invalid-event matrix and its private-schema reflection guard, retaining representative validation, registry completeness, and event round trips.
  • Exercise Python-input compilation with a valid serialized agent plan and the actual PyFlink key type, asserting successful operator construction instead of an unrelated JSON parsing failure.

Tests

  • Python: 130 tests passed across the three newly cleaned files. The original two timing-cleanup files were also validated separately: 75 passed.
  • Java: 128 focused tests passed on JDK 11 (BuiltInEventsTest, ActionJsonDeserializerTest, PythonDecisionModelBridgeTest, CompileUtilsTest).
  • Rebuilt the Flink 1.20 distribution from current source, including its JDK 21 implementation, before E2E verification.
  • E2E: AsyncExecutionTest and ParallelExecutionE2ETest, 19 tests passed on each of JDK 11 and JDK 21, with reruns disabled.
  • Ruff check/format, Spotless, and git diff --check passed.

Full repository and checkpoint-failover suites were not run.

API

No production behavior, public API, or configuration changes.

Documentation

  • doc-needed
  • doc-not-needed
  • doc-included

Was this patch authored or co-authored using generative AI tooling?

  • Yes
  • No

Generated-by: Codex CLI 0.153.4 (GPT-6; exact model version unavailable)

…tests

Use a barrier to verify overlapping gather calls, assert directly that an
existing release marker avoids polling sleep, and remove a redundant wait
after executor shutdown. Production code is unchanged.

Generated-by: Codex CLI 0.153.4 (GPT-6; exact model version unavailable)
Co-authored-by: Codex <codex@openai.com>
@wenjin272 wenjin272 added priority/major Default priority of the PR or issue. doc-not-needed Your PR changes do not impact docs python Pull requests that update python code fixVersion/1.0.0 The feature or bug should be implemented/fixed in the 1.0.0 version. labels Nov 25, 2026
@github-actions github-actions Bot added doc-not-needed Your PR changes do not impact docs and removed doc-not-needed Your PR changes do not impact docs labels Nov 25, 2026
Remove redundant event and third-party serialization tests, trim internal
protocol rejection matrices, and replace the missing-field NPE fixture.
Use a valid plan and explicit PyFlink key type to test successful compilation.
Verify concurrent execution with barriers instead of speed and sleep ordering.

Production code is unchanged.

Generated-by: Codex CLI 0.153.4 (GPT-6; exact model version unavailable)
Co-authored-by: Codex <codex@openai.com>
@wenjin272 wenjin272 added the java Pull requests that update java code label Nov 25, 2026
@wenjin272 wenjin272 changed the title [hotfix][python] Avoid timing-based assertions in async and recovery tests [hotfix][java][python] Simplify tests and remove timing assumptions Nov 25, 2026
@github-actions github-actions Bot added doc-not-needed Your PR changes do not impact docs and removed doc-not-needed Your PR changes do not impact docs labels Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs fixVersion/1.0.0 The feature or bug should be implemented/fixed in the 1.0.0 version. java Pull requests that update java code priority/major Default priority of the PR or issue. python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant