L. C. Hsieh created SPARK-61430:
-----------------------------------
Summary: Make the request structure tests of the Spark Connect
Rust client send and assert their requests
Key: SPARK-61430
URL: https://issues.apache.org/jira/browse/SPARK-61430
Project: Spark
Issue Type: Test
Components: Connect
Affects Versions: connect-rust-4.3.0
Reporter: L. C. Hsieh
Seven unit tests of crates/spark-connect-core/src/client.rs build the future of
a client call and drop it without polling it:
test_get_configs_request_structure, test_set_config_request_structure,
test_unset_config_request_structure, test_interrupt_all_request_structure,
test_interrupt_tag_request_structure,
test_interrupt_operation_request_structure,
test_release_session_request_structure
{code}
let client = SparkConnectClient::connect(&builder).await.unwrap();
// Note: This will fail against a real server, but tests the structure
let _result = client.get_configs(&["spark.sql.shuffle.partitions"]);
{code}
No request is built or sent, so they pass whatever the methods do: with the
request construction of all seven methods deliberately broken, all seven still
pass. No other test asserts the operation that these methods send (the keys or
pairs of a Config, the type and the tag or operation ID of an Interrupt) or the
session ID and user ID of a ReleaseSession.
They should drive the call against the recording service that client.rs already
has (request_fields_tests) and assert the request that the server received.
test_metadata_headers, which only asserts the user agent, should also assert
that the header of the connection string is attached to a request.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]