Skip to content

[SPARK-56586][CONNECT][TESTS] Retry flaky python foreachBatch termination test#55481

Closed
Feelitx wants to merge 3 commits into
apache:masterfrom
Feelitx:master
Closed

[SPARK-56586][CONNECT][TESTS] Retry flaky python foreachBatch termination test#55481
Feelitx wants to merge 3 commits into
apache:masterfrom
Feelitx:master

Conversation

@Feelitx
Copy link
Copy Markdown
Contributor

@Feelitx Feelitx commented Apr 22, 2026

What changes were proposed in this pull request?

This PR un-skips the Connect parity test test_streaming_foreach_batch_graceful_stop and applies the retry-timeout infrastructure introduced in SPARK-52843 (@eventually and @timeout). Additionally, it replaces the py4j-specific _jvm.java.lang.Thread.sleep() call with standard Python time.sleep().

Why are the changes needed?

This resolves SPARK-56565. The test for foreachBatch graceful stop was previously skipped for Connect because it inherently relied on Py4J's pinned thread execution model and caused flaky timeout behaviors. With the new retry infrastructure, we can safely re-enable it for the Connect module.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Verified by standard GitHub Actions on personal fork.

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

No.

@HyukjinKwon
Copy link
Copy Markdown
Member

Merged to master.

@HyukjinKwon
Copy link
Copy Markdown
Member

cc @zhengruifeng FYI

@HyukjinKwon HyukjinKwon changed the title [SPARK-56565][CONNECT][TESTS] Retry flaky python foreachBatch termination test [SPARK-56586][CONNECT][TESTS] Retry flaky python foreachBatch termination test Apr 23, 2026
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.

3 participants