You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "wombatu-kun (via GitHub)" <gi...@apache.org> on 2026/07/23 06:04:04 UTC
[PR] test(spark): Fix flaky TestSparkFilterHelper by giving it its own SparkSession [hudi]
wombatu-kun opened a new pull request, #19356:
URL: https://github.com/apache/hudi/pull/19356
### Describe the issue this Pull Request addresses
`org.apache.hudi.TestSparkFilterHelper.testConvertInExpression` is intermittently flaky, failing with `IllegalStateException: LiveListenerBus is stopped` (wrapped in `Error while instantiating 'SessionStateBuilder'`). It last surfaced across the spark3.3/3.4/3.5 `test-spark-java-tests-part1` jobs on an unrelated Flink-only PR: https://github.com/apache/hudi/actions/runs/29977957778. The test calls `functions.expr(...)`, which needs an active `SparkSession`, but `TestSparkFilterHelper` extends `HoodieSparkClientTestHarness` directly and never wires `initSparkContexts()` (that wiring lives in `HoodieClientTestBase`), so it relied on a leaked active session from a prior test in the same Surefire fork and failed whenever that session's context was already stopped.
### Summary and Changelog
Add `@BeforeEach`/`@AfterEach` that call the inherited `initSparkContexts()`/`cleanupSparkContexts()` so the test owns a fresh `SparkSession`, matching `HoodieClientTestBase` and the sibling `TestHoodieDataSourceHelper`. Test-only; no production code or assertions change. No code was copied.
### Impact
None. Test-only change confined to `TestSparkFilterHelper`.
### Risk Level
none
### Documentation Update
none
### Contributor's checklist
- [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [x] Enough context is provided in the sections above
- [x] Adequate tests were added if applicable
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(spark): Fix flaky TestSparkFilterHelper by giving it its own SparkSession [hudi]
Posted by "voonhous (via GitHub)" <gi...@apache.org>.
voonhous merged PR #19356:
URL: https://github.com/apache/hudi/pull/19356
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(spark): Fix flaky TestSparkFilterHelper by giving it its own SparkSession [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19356:
URL: https://github.com/apache/hudi/pull/19356#issuecomment-5055073689
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "62878e82296fd14248656f5ff749f993a8fc8c81",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "62878e82296fd14248656f5ff749f993a8fc8c81",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 62878e82296fd14248656f5ff749f993a8fc8c81 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(spark): Fix flaky TestSparkFilterHelper by giving it its own SparkSession [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19356:
URL: https://github.com/apache/hudi/pull/19356#issuecomment-5055106253
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "62878e82296fd14248656f5ff749f993a8fc8c81",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=15648",
"triggerID" : "62878e82296fd14248656f5ff749f993a8fc8c81",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 62878e82296fd14248656f5ff749f993a8fc8c81 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=15648)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org