HyukjinKwon opened a new pull request, #645:
URL: https://github.com/apache/spark-connect-rust/pull/645

   ### What changes were proposed in this pull request?
   
   The mock Spark Connect server of the Python tests answers a forgotten 
session's requests but records none of them (see `forget_session`). Its 
listener counters were the exception: `listener_subscriptions`, 
`listener_removals` and `listener_streams_finished` still counted a forgotten 
session's listener registrations, removals and stream ends. With this PR they 
count only the requests of sessions that are not forgotten. The answers are 
unchanged, and the requests are still counted in `forgotten_requests`.
   
   ### Why are the changes needed?
   
   The listener bus tests wait on these counters (`wait_listener_calls`, 
`wait_listener_removal`, `wait_listener_registration`, 
`wait_listener_streams_finished`). A listener request that an ended test left 
behind could reach the server during a later test and move them. A post-merge 
review of the earlier change that forgets a session's requests of every kind 
found this. No current test hits it.
   
   Before: after `forget_session(ended.session_id)`, 
`ended.streams.addListener(listener)` moved `listener_subscriptions` from 0 to 
1.
   After: it stays 0, and `forgotten_requests["execute"]` counts the request.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, test-only.
   
   ### How was this patch tested?
   
   A new offline test, 
`test_the_listener_requests_of_a_forgotten_session_are_answered_but_not_counted`:
   - a forgotten session's add and remove of a listener leave the three 
counters at 0;
   - a live session's still count;
   - without the fix it fails at `assert service.listener_subscriptions == 0` 
(1 == 0).
   
   CI's offline set passes, with `TZ=UTC`: `test_dropin_offline.py`, 
`test_arrow_handoff.py` and `test_ml_offline.py`, 3689 passed and 8 skipped. 
The ruff gates pass.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5.5
   
   This pull request and its description were written by Isaac.
   


-- 
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]

Reply via email to