MCPcopy Create free account
hub / github.com/apache/arrow-rs / test_execute_ingest_error

Function test_execute_ingest_error

arrow-flight/tests/flight_sql_client.rs:99–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97
98#[tokio::test]
99pub async fn test_execute_ingest_error() {
100 let test_server = FlightSqlServiceImpl::new();
101 let fixture = TestFixture::new(test_server.service()).await;
102 let channel = fixture.channel().await;
103 let mut flight_sql_client = FlightSqlServiceClient::new(channel);
104 let cmd = make_ingest_command();
105 // send an error from the client
106 let batches = vec![
107 Ok(make_primitive_batch(5)),
108 Err(FlightError::NotYetImplemented(
109 "Client error message".to_string(),
110 )),
111 ];
112 // make sure the client returns the error from the client
113 let err = flight_sql_client
114 .execute_ingest(cmd, futures::stream::iter(batches))
115 .await
116 .unwrap_err();
117 assert_eq!(
118 err.to_string(),
119 "External error: Not yet implemented: Client error message"
120 );
121}
122
123#[tokio::test]
124pub async fn test_do_put_empty_stream() {

Callers

nothing calls this directly

Calls 4

make_ingest_commandFunction · 0.85
execute_ingestMethod · 0.80
serviceMethod · 0.45
channelMethod · 0.45

Tested by

no test coverage detected