dongjoon-hyun opened a new pull request, #60567: URL: https://github.com/apache/spark/pull/60567
### What changes were proposed in this pull request? This PR aims to fix the test helper `withFsHistoryProvider` in `sql/core` to stop the `FsHistoryProvider` that it creates. The helper declares `var provider` before `try`, but declares `val provider` again inside `try`. Since the inner `val` shadows the outer `var`, the `finally` block always sees `null` and never calls `provider.stop()`. This PR removes the inner `val` so that the outer `var` is assigned. ### Why are the changes needed? The `finally` block has been dead code since the helper was added by SPARK-31953 (#28781), so the provider's listing store and the loaded application UI stores are never closed. This has not failed any test or leaked threads because, in tests, `FsHistoryProvider` replays event logs in the caller thread and `start()` is never called. ### Does this PR introduce _any_ user-facing change? No. This is a test-only change. ### How was this patch tested? Pass the CIs with the existing `StreamingQueryHistorySuite`, the only caller of this helper. I also checked manually that the provider's application listing is empty after `withFsHistoryProvider` returns, which means `stop()` closed it. Without this PR, the listing still had one application. No test is added because this is a one-line fix in a test helper. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 5.5 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
