zhengruifeng commented on PR #55560:
URL: https://github.com/apache/spark/pull/55560#issuecomment-4342785401
@HyukjinKwon @gaogaotiantian I am asking the AI to read the commit history
and modify the tests while keep the original intents.
```
● Here's a per-test trace through history and how my fixes line up with the
original intent:
Test-by-test review
#: 1
Test: test_fails_to_create_session_without_remote_and_channel_builder
Added by: SPARK-43332 (May 2023)
Original intent: Builder raises ValueError when nothing is specified
After my fix: Unchanged
Verdict: ✓
────────────────────────────────────────
#: 2
Test:
test_fails_to_create_when_both_remote_and_channel_builder_are_specified
Added by: SPARK-43332
Original intent: Builder raises ValueError when both are specified
After my fix: Unchanged
Verdict: ✓
────────────────────────────────────────
#: 3
Test: test_creates_session_with_channel_builder
Added by: SPARK-43332
Original intent: Host parsed from channel-builder URL
After my fix: release_session_on_close = False skips fake-remote RPC; host
check unchanged
Verdict: ✓
────────────────────────────────────────
#: 4
Test: test_creates_session_with_remote
Added by: SPARK-43332
Original intent: Host parsed from remote URL
After my fix: Same shape as #3
Verdict: ✓
────────────────────────────────────────
#: 5
Test: test_session_stop
Added by: SPARK-44211 (Jun 2023)
Original intent: is_stopped is False before stop(), True after
After my fix: release_session_on_close = False skips RPC; client.close()
still flips _closed → is_stopped semantics intact
Verdict: ✓
────────────────────────────────────────
#: 6
Test: test_session_create_sets_active_session
Added by: SPARK-44410 (Jul 2023)
Original intent: .create() sets the new session as active so getOrCreate()
returns it
After my fix: setUp resets class state so the test no longer depends on
order; semantic check (assertIs) preserved
Verdict: ✓
────────────────────────────────────────
#: 7
Test: test_active_session_expires_when_client_closes
Added by: SPARK-47986 (May 2024)
Original intent: After _client._closed = True, getActiveSession() returns
None, and a new getOrCreate() returns a fresh session
After my fix: Unchanged (already worked)
Verdict: ✓
────────────────────────────────────────
#: 8
Test: test_default_session_expires_when_client_closes
Added by: SPARK-47986
Original intent: Parallel of #7 for default session
After my fix: getDefaultSession → _get_default_session (the actual
classmethod that exists)
Verdict: ✓ semantically; see note below
```
--
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]