aglinxinyuan opened a new pull request, #9623:
URL: https://github.com/apache/texera/pull/9623

   ### What changes were proposed in this PR?
   
   Shares repeated test setup, mock scaffolding, and assertion helpers across 
seven `pyamber` unit test suites without changing test coverage or production 
code:
   
   - **Large binary output stream tests:** introduces local context-manager 
helpers for paired S3 client/bucket patches and fresh test-value fixtures 
across `test_large_binary_output_stream.py`, preserving all literal assertions, 
patch lifetimes, thread-gate checks, and error scopes.
   - **Async RPC and debug control-handler tests:** extracts shared 
mock-handler, stream/payload factory, and invocation helpers across 
`test_debug_command_handler.py`, `test_evaluate_expression_handler.py`, 
`test_async_rpc_client.py`, and `test_async_rpc_server.py`.
   - **Table and batch-operator tests:** consolidates repeated batch/table 
construction and row-assertion helpers across `test_table.py` and 
`test_count_batch_operator.py`.
   
   All existing test names and assertions are preserved.
   
   ### Any related issues, documentation, discussions?
   
   Closes #9622.
   
   ### How was this PR tested?
   
   Ran in `amber/` against `origin/main` (`f030df12b7`) before and after the 
refactor on Python 3.12:
   
   ```bash
   ruff check src/main/python src/test/python
   ruff format --check src/main/python src/test/python
   python -m pytest -p no:timeout \
     src/test/python/pytexera/storage/test_large_binary_output_stream.py \
     
src/test/python/core/architecture/handlers/control/test_debug_command_handler.py
 \
     
src/test/python/core/architecture/handlers/control/test_evaluate_expression_handler.py
 \
     src/test/python/core/architecture/rpc/test_async_rpc_client.py \
     src/test/python/core/architecture/rpc/test_async_rpc_server.py \
     src/test/python/core/models/test_table.py \
     src/test/python/pytexera/udf/examples/test_count_batch_operator.py
   ```
   
   - `ruff check src/main/python src/test/python` and `ruff format --check 
src/main/python src/test/python`: passed.
   - Baseline vs. patched JUnit XML comparison: `119` passed, `0` failed, `0` 
skipped (`0` test name/outcome diffs across all 7 suites).
   - Negative mutation controls: breaking `large_binary_output_stream.py` (`if 
large_binary is None:`), `async_rpc_server.py` (`return command_id < 0`), and 
`count_batch_operator.py` (`self.count += 1`) each failed its guarding suite 
(`rc=1`), confirming the refactored assertions remain live.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Antigravity (Gemini)
   


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