zhengruifeng opened a new pull request, #55617: URL: https://github.com/apache/spark/pull/55617
### What changes were proposed in this pull request? Consolidate `python/pyspark/sql/tests/connect/test_session.py` into `python/pyspark/sql/tests/connect/test_connect_session.py`: - Move the module-level `CustomChannelBuilder(DefaultChannelBuilder)` and the `SparkSessionTestCase` class from `test_session.py` into `test_connect_session.py`. - Rename `SparkSessionTestCase` to `SparkConnectSessionBuilderTests` to disambiguate from `pyspark.testing.mlutils.SparkSessionTestCase` and to describe its scope (builder validation + session-state tests against fake `sc://` remotes, no real server). - Add `Optional` and `DefaultChannelBuilder` imports; the rest of the imports were already present in `test_connect_session.py`. - Delete `python/pyspark/sql/tests/connect/test_session.py`. - Drop the now-stale `pyspark.sql.tests.connect.test_session` entry from `dev/sparktestsupport/modules.py`. ### Why are the changes needed? Both files lived in the same `tests/connect/` directory and tested Spark Connect session behavior. Two separate files added test-runner overhead (separate module entry, separate process startup) without a clear separation of concerns. Folding them into a single file groups the three session test classes together: - `SparkConnectSessionTests` — real-server query / error / session-id tests - `SparkConnectSessionBuilderTests` — builder validation + session-state tests against fake `sc://` remotes - `SparkConnectSessionWithOptionsTest` — session with config options ### Does this PR introduce _any_ user-facing change? No. Test-only change. ### How was this patch tested? Existing tests in both files are preserved. The merged file passes `python -m py_compile` and `black --check` (26.3.1). ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (claude-opus-4-7) -- 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]
