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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to