[ 
https://issues.apache.org/jira/browse/SPARK-61431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-61431:
-----------------------------------
    Labels: pull-request-available  (was: )

> Share the loopback service and the session and golden helpers of the Rust 
> integration tests in a common module of each crate
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-61431
>                 URL: https://issues.apache.org/jira/browse/SPARK-61431
>             Project: Spark
>          Issue Type: Improvement
>          Components: Connect
>    Affects Versions: connect-rust-4.3.0
>            Reporter: L. C. Hsieh
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: connect-rust-4.3.0
>
>
> The Rust integration tests carry copies of the same helpers in each file.
> In crates/spark-connect-core/tests, five files (reattach_cleanup, deadlines, 
> user_context, server_session, artifact_uploads) each define their own 
> loopback tonic service: a NamedService plus a Service<http::Request<Body>> 
> that matches the path of the request, with the same listener setup and the 
> same Drop that aborts the server. The copies differ only in which RPCs they 
> route.
> In crates/spark-connect/tests, should_run() is defined in 9 files, session() 
> in 12 (in two forms), load_goldens() in 5 (differing in the file, the message 
> type and the normalization), and normalize_relation() in 5 (two of them never 
> called).
> This moves the copies that are identical, or that differ only by a parameter, 
> into a tests/common/mod.rs of each crate: a route table for the loopback 
> service (the test names the RPCs it answers and the handler of each), and 
> should_run, session, live_session, load_goldens and normalize_relation. A 
> copy that differs in behaviour stays in its file. No test is renamed, moved 
> or removed, and no assertion or golden file changes.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to